3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime(); var_dump($date); $date2 = \DateTime::createFromFormat('U', $date->format('U'), $date->getTimezone()); var_dump($date2);
based on kUuke