3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arguments = array('2014-05-06'); $x = call_user_func_array(array('DateTime', '__construct'), $arguments); echo $x->format('d.m.Y');
Output for 8.0.10 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method DateTime::__construct() cannot be called statically in /in/hmk7X:4 Stack trace: #0 {main} thrown in /in/hmk7X on line 4
Process exited with code 255.
Output for 8.0.0 - 8.0.9
Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($function) must be a valid callback, non-static method DateTime::__construct() cannot be called statically in /in/hmk7X:4 Stack trace: #0 {main} thrown in /in/hmk7X on line 4
Process exited with code 255.
Output for 7.0.0 - 7.0.32, 7.1.0 - 7.1.24, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33
Warning: call_user_func_array() expects parameter 1 to be a valid callback, non-static method DateTime::__construct() cannot be called statically in /in/hmk7X on line 4 Fatal error: Uncaught Error: Call to a member function format() on null in /in/hmk7X:5 Stack trace: #0 {main} thrown in /in/hmk7X on line 5
Process exited with code 255.
Output for 5.6.0 - 5.6.38
Warning: call_user_func_array() expects parameter 1 to be a valid callback, non-static method DateTime::__construct() cannot be called statically in /in/hmk7X on line 4 Fatal error: Call to a member function format() on null in /in/hmk7X on line 5
Process exited with code 255.
Output for 5.5.0 - 5.5.38
Warning: call_user_func_array() expects parameter 1 to be a valid callback, non-static method DateTime::__construct() cannot be called statically in /in/hmk7X on line 4 Fatal error: Call to a member function format() on a non-object in /in/hmk7X on line 5
Process exited with code 255.

preferences:
205.43 ms | 402 KiB | 291 Q