3v4l.org

run code in 300+ PHP versions simultaneously
<?php setlocale(LC_TIME, "nl_NL"); $dbdate = "2019-06-24 18:02:30"; //SQL UTC timestamp $date = DateTime::createFromFormat("Y-m-d H:i:s", $dbdate, new DateTimeZone('UTC')); $date->setTimezone(new DateTimeZone('Europe/Amsterdam')); $fdate0 = $date->format('l H:i Y-m-d'); $fdate1 = strftime("%A %R %F",$date->getTimestamp()); echo $fdate0." compared to ".$fdate1;
Output for 8.4.1 - 8.4.13
Deprecated: Function strftime() is deprecated since 8.1, use IntlDateFormatter::format() instead in /in/dNQZ4 on line 9 Monday 20:02 2019-06-24 compared to maandag 20:02 2019-06-24
Output for 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25
Deprecated: Function strftime() is deprecated in /in/dNQZ4 on line 9 Monday 20:02 2019-06-24 compared to maandag 20:02 2019-06-24
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.31, 7.4.4 - 7.4.33, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30
Monday 20:02 2019-06-24 compared to maandag 20:02 2019-06-24
Output for 7.3.32 - 7.3.33, 8.0.13
Monday 20:02 2019-06-24 compared to maandag 18:02 2019-06-24
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.26, 7.3.0 - 7.3.13, 7.4.0 - 7.4.1
Monday 20:02 2019-06-24 compared to Monday 20:02 2019-06-24

preferences:
153.03 ms | 412 KiB | 5 Q