Checks whether the specified IP address and IP mask are valid settings for a network interface.
Syntax
public static function ip_interface ($ip_address, $ip_mask)
Parameters
ip_address
A string value that specifies the IP address to check.
ip_mask
A string value that specifies the IP mask.
Returns
A boolean which is true if the specified IP address and IP mask are considered valid for a network interface, false otherwise.
Remarks
The requirements to the format of an IP address are as follows: it shouldn't be equal to 0.0.0.0, neither should it belong to broadcast addresses (formatted as x.x.x.255 or 255.x.x.x) and loopback addresses (127.x.x.x). A valid IP address that can be used for a network interface should belong to class A, B, or C.
The specified IP mask shouldn't be equal to 0.0.0.0 either.
Also, the function checks whether the specified IP address and IP mask do not specified a subnet of the minimal size.