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('m/d/Y', '10/19/2015'); echo $start->format('Y-m-d 00:00:00'), PHP_EOL; echo $start->format('U'), PHP_EOL; $end = clone $start; $end->modify( '+1 day' ); echo $end->format('Y-m-d 00:00:00'), PHP_EOL; $start = DateTime::createFromFormat('m/d/Y', '10/20/2015'); echo $start->format('Y-m-d 00:00:00'), PHP_EOL; echo $start->format('U'), PHP_EOL;
based on Ykv52
Output for 5.6.28, 7.0.20 - 7.2.0
10.06.2013 1370885036 1444843436 2015-10-19 00:00:00 1445275436 2015-10-20 00:00:00 2015-10-20 00:00:00 1445361836
Output for 5.4.0 - 5.6.23, 7.0.0 - 7.0.8
10.06.2013 1370885035 1444843435 2015-10-19 00:00:00 1445275435 2015-10-20 00:00:00 2015-10-20 00:00:00 1445361835