Validating email with regular expression

I think "Beware a valid URL need not specify..." would be better.

$filtered === 0) Often I see some code like the following:$value = "12";if( filter_var($value, FILTER_VALIDATE_INT) )The above works as intended, except when $value is "0". For the correct behavior, you have not only to check if it is equal (==) to false, but also identic (===) to FALSE:$value = " 0 ";if( filter_var($value, FILTER_VALIDATE_INT) === FALSE )I hope, I could help.

Leave a Reply