3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo date('T'); $now = DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimezone(new \DateTimeZone(MDT)); echo $now->format("Ymd H:i:s");
Output for 7.2.0 - 7.2.26, 7.3.0 - 7.3.13, 7.4.0 - 7.4.1
CEST Warning: Use of undefined constant MDT - assumed 'MDT' (this will throw an Error in a future version of PHP) in /in/v7MqU on line 3 20170703 04:10:12
Output for 5.6.0 - 5.6.21, 5.6.23 - 5.6.40, 7.0.0 - 7.0.6, 7.0.8 - 7.0.33, 7.1.0 - 7.1.33
CEST Notice: Use of undefined constant MDT - assumed 'MDT' in /in/v7MqU on line 3 20170703 04:10:12
Output for 5.6.22, 7.0.7
CEST Notice: Use of undefined constant MDT - assumed 'MDT' in /in/v7MqU on line 3 20170703 04:10:13

preferences:
114.98 ms | 401 KiB | 157 Q