Checks whether the specified IP address is well-formatted.
Syntax
public static function ip ($ip)
Parameters
ip
A string value that specifies the IP address to check.
Returns
A boolean which is true if the IP address is well-formatted, false otherwise.
Remarks
A well-formatted IP address is set using the dotted-decimal notation, e.g. 192.123.12.1. This notation implies that an IP address consists of four blocks, each holding a value 0 to 255, delimited by dots. A valid address shouldn't be equal to 0.0.0.0.