Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP FILTER_VALIDATE_IP Filter

PHP FILTER_VALIDATE_IP Filter


PHP Filter Reference Manual Complete PHP Filter Reference Manual


Definition and Usage

The FILTER_VALIDATE_IP filter validates a value as an IP address.

Possible flags:


Example 1

The output of the code is shown below:

IP is valid


Example 2

The output of the code is shown below:

IP is valid


PHP Filter Reference Manual Complete PHP Filter Reference Manual