isLocal() public static method

Checks if an IP is local
public static isLocal ( string $ip ) : boolean
$ip string IP
return boolean true if the IP is local, otherwise false
Beispiel #1
0
 public function testLocal()
 {
     $status = Ip::isLocal('192.168.5.5');
     $this->assertTrue($status);
     $status = Ip::isLocal('fe80::202:b3ff:fe1e:8329');
     $this->assertTrue($status);
 }