No Hidden Nullable

../_images/no-hidden-nullable.png

A hidden nullable is a, now deprecated, PHP features where typed parameters with a default value of null are automatically nullable.

Well, that is true only if PHP can spot the null at compilation time: when the null is hidden (sic) in a constant, then it is not recognized, and it leads to a Fatal Error.

This is due to PHP postponing the evaluation of the constant to execution phase.

See Also

PHP Features