3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myDate = DateTime::createFromFormat('mdY', '06102013'); echo $myDate->format('d.m.Y'), PHP_EOL; echo $myDate->format('U'), PHP_EOL; echo time();
Output for 7.4.26 - 7.4.33, 8.1.11
10.06.2013 1370847893 1635926693
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.32, 7.4.0 - 7.4.25, 8.0.0 - 8.0.12
10.06.2013 1370851493 1635926693
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
Warning: DateTime::createFromFormat(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /in/2Or6T on line 3 10.06.2013 1370851493 1635926693

preferences:
212.39 ms | 403 KiB | 307 Q