3v4l.org

run code in 300+ PHP versions simultaneously
<?php $callable = array($x, $y); call_user_func($callable); $callable();
Output for 8.0.10 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Warning: Undefined variable $x in /in/6AsHT on line 2 Warning: Undefined variable $y in /in/6AsHT on line 2 Fatal error: Uncaught TypeError: call_user_func(): Argument #1 ($callback) must be a valid callback, first array member is not a valid class name or object in /in/6AsHT:3 Stack trace: #0 {main} thrown in /in/6AsHT on line 3
Process exited with code 255.
Output for 8.0.0 - 8.0.9
Warning: Undefined variable $x in /in/6AsHT on line 2 Warning: Undefined variable $y in /in/6AsHT on line 2 Fatal error: Uncaught TypeError: call_user_func(): Argument #1 ($function) must be a valid callback, first array member is not a valid class name or object in /in/6AsHT:3 Stack trace: #0 {main} thrown in /in/6AsHT on line 3
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.31, 7.4.0 - 7.4.33
Notice: Undefined variable: x in /in/6AsHT on line 2 Notice: Undefined variable: y in /in/6AsHT on line 2 Warning: call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in /in/6AsHT on line 3 Fatal error: Uncaught Error: First array member is not a valid class name or object in /in/6AsHT:4 Stack trace: #0 {main} thrown in /in/6AsHT on line 4
Process exited with code 255.
Output for 7.3.32 - 7.3.33
Warning: call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in /in/6AsHT on line 3 Fatal error: Uncaught Error: First array member is not a valid class name or object in /in/6AsHT:4 Stack trace: #0 {main} thrown in /in/6AsHT on line 4
Process exited with code 255.
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.28
Notice: Undefined variable: x in /in/6AsHT on line 2 Notice: Undefined variable: y in /in/6AsHT on line 2 Warning: call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in /in/6AsHT on line 3 Fatal error: First array member is not a valid class name or object in /in/6AsHT on line 4
Process exited with code 255.

preferences:
182.76 ms | 402 KiB | 221 Q