3v4l.org

run code in 300+ PHP versions simultaneously
<?php const FOO = (int) "42";
Output for 7.3.0 - 7.3.31, 7.4.0 - 7.4.25, 8.0.0 - 8.0.12
Fatal error: Constant expression contains invalid operations in /in/0Wl9X on line 3
Process exited with code 255.

preferences:
31.16 ms | 409 KiB | 5 Q