3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php use \DateTime; $date = '2015-10-10 10:10:10'; $from = DateTime::createFromFormat("%Y-%m-%d %H:%i:%s",$date); echo $from ?>
based on rkJtP
Output for 5.5.25 - 5.5.35, 5.6.9 - 7.2.0
Warning: The use statement with non-compound name 'DateTime' has no effect in /in/lk3eT on line 2
Output for 5.3.21 - 5.5.24, 5.6.8