Reusing Decimals For Bananas

../_images/errorNumber.png

Besides decimal numbers such as 8.53 or 3.141592654, PHP has 2 extra decimal numbers: INF, for infinity and NAN for not a number. Both of them default to the eponymous string, when displayed. This might be useful.

This trick also works for Array, with some error suppression, or not-too-recent PHP version. Object generates a Fatal error, and Resource displays something that can’t be reused to build another human readable word: Resource id #1: bummer.

See Also

PHP Error Messages

PHP Features