Inconsistent parameter evaluation of filter_var()

Bug report

A possible null result of filter_var(..., FILTER_VALIDATE_BOOLEAN, ...) is only recognized if the flag FILTER_NULL_ON_FAILURE is specified in the function call itself. It's not recognized if the flag comes in as a variable.

Code snippet that reproduces the problem

https://phpstan.org/r/396ec7cf-dd6d-4f3a-be9b-f92a1bfef5fe

Expected output

no error

Did PHPStan help you today? Did it make you happy in any way?

No response