3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f() { $foo = null; $foo->foo(); } function f1() { f(); } set_error_handler(function() { var_dump(func_get_args());}, 0xffffffff); f1();
Output for 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Fatal error: Uncaught Error: Call to a member function foo() on null in /in/AWj08:5 Stack trace: #0 /in/AWj08(9): f() #1 /in/AWj08(13): f1() #2 {main} thrown in /in/AWj08 on line 5
Process exited with code 255.

preferences:
170.67 ms | 403 KiB | 167 Q