src/Chippyash/Validation/Util/IpUtil.php
public static function isValidIP($ipAddr, $allowipv6 = false)
    {
        $validator = new ZendIp(array('allowipv6' => $allowipv6));
        return $validator->isValid($ipAddr);
    }
public static function isValidIP($ipAddr, $allowipv6 = false)
    {
        $validator = new ZendIp(array('allowipv6' => $allowipv6));
        return $validator->isValid($ipAddr);
    }
public static function isValidIP ( $ ipAddr , $ allowipv6 = false ) { $ validator = new ZendIp ( array ( 'allowipv6' => $ allowipv6 ) ) ; return $ validator -> isValid ( $ ipAddr ) ; }
Check if string is a valid ip address

@param  string  $ipAddr
@param  boolean $allowipv6
@return boolean
Check if string is a valid ip address