3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(null $a) { var_dump($a); } foo(null); foo(42);
Output for 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
NULL Fatal error: Uncaught TypeError: foo(): Argument #1 ($a) must be of type null, int given, called in /in/5UR5A on line 6 and defined in /in/5UR5A:3 Stack trace: #0 /in/5UR5A(6): foo(42) #1 {main} thrown in /in/5UR5A on line 3
Process exited with code 255.
Output for 8.1.0 - 8.1.27
Fatal error: Null can not be used as a standalone type in /in/5UR5A on line 3
Process exited with code 255.

preferences:
171.46 ms | 1399 KiB | 58 Q