3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(): null {} function bar(): false {} function foo(): null {} function doNotMakeSense(): ?null {} foo();
Output for 8.0.1 - 8.0.23, 8.1.0 - 8.1.10
Fatal error: Null can not be used as a standalone type in /in/PuiNS on line 3
Process exited with code 255.
Output for 7.4.0 - 7.4.30
Fatal error: Cannot use 'null' as class name as it is reserved in /in/PuiNS on line 3
Process exited with code 255.

preferences:
159.85 ms | 996 KiB | 7 Q