Reusing Decimals For Bananas
<?php
echo 'BA', sqrt(-1), 'A', PHP_EOL;
echo 'DIS', exp(1000), 'ECTION', PHP_EOL;
echo 'ANTI', log(0), 'LAMMATORY', PHP_EOL;
echo 'dis', strtolower(@implode('', [[]])), 'ment', PHP_EOL;
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
- Original trigger
- NAN and INF for BANANA [Try me]
PHP Error Messages
PHP Features
Last updated: 10 September 2026