3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php use \DateTime; $date = '2015-10-10 10:10:10'; $from = new DateTime($date); echo $from ?>
based on ZQUev
Output for 7.1.0 - 7.2.12
Warning: The use statement with non-compound name 'DateTime' has no effect in /in/rkJtP on line 2 Recoverable fatal error: Object of class DateTime could not be converted to string in /in/rkJtP on line 6
Process exited with code 255.
Output for 7.0.0 - 7.0.32
Warning: The use statement with non-compound name 'DateTime' has no effect in /in/rkJtP on line 2 Catchable fatal error: Object of class DateTime could not be converted to string in /in/rkJtP on line 6
Process exited with code 255.
Output for hhvm-3.22.0
Fatal error: Uncaught Error: Object of class DateTime could not be converted to string in /in/rkJtP:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.11.1 - 3.21.3
Fatal error: Uncaught Error: Object of class DateTime could not be converted to string in /in/rkJtP:7 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.3.21 - 5.5.24, 5.6.0 - 5.6.8, hhvm-3.10.1
Catchable fatal error: Object of class DateTime could not be converted to string in /in/rkJtP on line 7
Process exited with code 255.
Output for 5.5.25 - 5.5.38, 5.6.9 - 5.6.38
Warning: The use statement with non-compound name 'DateTime' has no effect in /in/rkJtP on line 2 Catchable fatal error: Object of class DateTime could not be converted to string in /in/rkJtP on line 7
Process exited with code 255.