3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arguments = array('2014-05-06'); $x = call_user_func_array(array('DateTime', '__construct'), $arguments); echo $x->format('d.m.Y');
based on EcJOH
Output for 7.0.0 - 7.2.12
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 hhvm-3.22.0
Fatal error: Uncaught Error: Non-static method DateTime::__construct() cannot be called statically in /in/hmk7X:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.17.3 - 3.21.3
Fatal error: Uncaught Error: Non-static method DateTime::__construct() cannot be called statically in /in/hmk7X:4 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.11.1 - 3.15.4
Fatal error: Uncaught Error: Non-static method DateTime::__construct() cannot be called statically in /in/hmk7X:4 Stack trace: #0 /in/hmk7X(4): DateTime::__construct() #1 {main}
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.3.22 - 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.