validate_ip

Validation of an IP address.

Parameters
string $value

The value being checked

#
string $type = 'both'

The IP protocol version to validate against IPv4 or IPv6

#
Returns
boolean

TRUE on success; FALSE on failure