3v4l.org

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

preferences:
92.77 ms | 402 KiB | 81 Q