concrete/src/Utility/IPAddress.php
public function isLoopBack()
    {
        if (!$this->isIpSet()) {
            throw new \Exception('No IP Set');
        }
        if ($this->isIPv4() && strpos($this->ipHex, '7f') === 0) {
            return true; //IPv4 loopback 127.0.0.0/8
        } elseif ($this->ipHex === '00000000000000000000000000000001'
            || $this->ipHex === '00000000000000000000ffff7f000001'
        ) {
            return true; //IPv6 loopback ::1 or ::ffff:127.0.0.1
        }

        return false;
    }
public function isLoopBack()
    {
        if (!$this->isIpSet()) {
            throw new \Exception('No IP Set');
        }
        if ($this->isIPv4() && strpos($this->ipHex, '7f') === 0) {
            return true; //IPv4 loopback 127.0.0.0/8
        } elseif ($this->ipHex === '00000000000000000000000000000001'
            || $this->ipHex === '00000000000000000000ffff7f000001'
        ) {
            return true; //IPv6 loopback ::1 or ::ffff:127.0.0.1
        }

        return false;
    }
public function isLoopBack ( ) { if ( ! $ this -> isIpSet ( ) ) { throw new \ Exception ( 'No IP Set' ) ; } if ( $ this -> isIPv4 ( ) && strpos ( $ this -> ipHex , '7f' ) === 0 ) { return true ; //IPv4 loopback 127.0.0.0/8 } elseif ( $ this -> ipHex === '00000000000000000000000000000001' || $ this -> ipHex === '00000000000000000000ffff7f000001' ) { return true ; //IPv6 loopback ::1 or ::ffff:127.0.0.1 } return false ; }
Used to check of the current IP is a loopback IP address.

@throws \Exception if no IP is set

@return bool returns true for loopback IP's, returns false if it is not a loopback IP
Used to check of the current IP is a loopback IP address .