3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimezone(new \DateTimeZone(date('GMT'))); echo $now->format("Ymd H:i:s");
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.2.0 - 7.2.6
Fatal error: Uncaught Exception: DateTimeZone::__construct(): Unknown or bad timezone (13JulCEST) in /in/ugbN6:2 Stack trace: #0 /in/ugbN6(2): DateTimeZone->__construct('13JulCEST') #1 {main} thrown in /in/ugbN6 on line 2
Process exited with code 255.

preferences:
72.26 ms | 402 KiB | 37 Q