3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($bar){ var_dump($bar); } foo();
Output for 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
Fatal error: Uncaught ArgumentCountError: Too few arguments to function foo(), 0 passed in /in/IMnRo on line 9 and exactly 1 expected in /in/IMnRo:3 Stack trace: #0 /in/IMnRo(9): foo() #1 {main} thrown in /in/IMnRo on line 3
Process exited with code 255.
Output for 7.0.0 - 7.0.20
Warning: Missing argument 1 for foo(), called in /in/IMnRo on line 9 and defined in /in/IMnRo on line 3 Notice: Undefined variable: bar in /in/IMnRo on line 4 NULL

preferences:
151.77 ms | 401 KiB | 174 Q