protected function _validateIPv4($value) {
        $ip2long = ip2long($value);
        if($ip2long === false) {
            return false;
        }

        return $value == long2ip($ip2long);
    }
protected function _validateIPv4($value) {
        $ip2long = ip2long($value);
        if($ip2long === false) {
            return false;
        }

        return $value == long2ip($ip2long);
    }
protected function _validateIPv4 ( $ value ) { $ ip2long = ip2long ( $ value ) ; if ( $ ip2long === false ) { return false ; } return $ value == long2ip ( $ ip2long ) ; }
Validates an IPv4 address

@param string $value
Validates an IPv4 address