src/Validator.php
public static function validateIP( $v ) {
		// if integer then convert to string
		if( $ip = filter_var($v, FILTER_VALIDATE_INT) )
			$v = long2ip($ip);
		return filter_var($v, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
	}
public static function validateIP( $v ) {
		// if integer then convert to string
		if( $ip = filter_var($v, FILTER_VALIDATE_INT) )
			$v = long2ip($ip);
		return filter_var($v, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
	}
public static function validateIP ( $ v ) { // if integer then convert to string if ( $ ip = filter_var ( $ v , FILTER_VALIDATE_INT ) ) $ v = long2ip ( $ ip ) ; return filter_var ( $ v , FILTER_VALIDATE_IP , FILTER_FLAG_IPV4 ) ; }
Validates a value as an ip4 address.
@param  mixed   $v
@return string
Validates a value as an ip4 address .