3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $myDate = DateTime::createFromFormat('mdY', '06102013'); echo $myDate->format('d.m.Y'), PHP_EOL; echo $myDate->format('U'), PHP_EOL; echo time(), PHP_EOL; $start = DateTime::createFromFormat('mdY', '10192015'); echo $start->setTime(0, 0), PHP_EOL; echo $start->format('Y-m-d 00:00:00'), PHP_EOL; echo $start->format('U');
based on Salmr
Output for 7.1.0 - 7.2.0
10.06.2013 1370884723 1444843123 Recoverable fatal error: Object of class DateTime could not be converted to string in /in/ZS2j4 on line 9
Process exited with code 255.
Output for 5.4.0 - 7.0.20
10.06.2013 1370884723 1444843123 Catchable fatal error: Object of class DateTime could not be converted to string in /in/ZS2j4 on line 9
Process exited with code 255.