I think I found a bug in PHP 5.4.23, but I suppose it is possible expected behavior as well. I am expecting a filter_var call to return
null, but it isn’t. Is this code correct, and is my assumption that this is a bug and not a recent change correct as well?
var_dump(filter_var(null, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE));
PHP 5.3.28 Results:
PHP 5.4.23 Results:
Usually when a function returns
NULL it succeded.
false is returned when it failed (by convention).