public static function isPrivateIp(string $ip): bool
    {
        foreach (self::PRIVATE_IPV4_RANGES as $range) {
            if (self::isIpInCidr($ip, $range)) {
                return true;
            }
        }

        return false;
    }
public static function isPrivateIp(string $ip): bool
    {
        foreach (self::PRIVATE_IPV4_RANGES as $range) {
            if (self::isIpInCidr($ip, $range)) {
                return true;
            }
        }

        return false;
    }
public static function isPrivateIp ( string $ ip ) : bool { foreach ( self :: PRIVATE_IPV4_RANGES as $ range ) { if ( self :: isIpInCidr ( $ ip , $ range ) ) { return true ; } } return false ; }
Determine whether a given ip is in one of the private network ranges

@param string $ip The ip to test
@return bool
Determine whether a given ip is in one of the private network ranges