3v4l.org

run code in 500+ PHP versions simultaneously
<?php class NarrowBoolFalse3 { /** * @param bool|int|false|int<0, max> $param */ public function go(bool|int|false $param) { if (rand(0, 1)) { return rand(0, 1) ? true : false; } return 1; } }
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
Fatal error: Duplicate type false is redundant in /in/KcCIk on line 8
Process exited with code 255.

preferences:
61.02 ms | 850 KiB | 3 Q