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.0
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.20
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 5.5.25 - 5.5.35, 5.6.9 - 5.6.28
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.
Output for 5.3.21 - 5.5.24, 5.6.8
Catchable fatal error: Object of class DateTime could not be converted to string in /in/rkJtP on line 7
Process exited with code 255.