3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $myTime = new DateTime('now', new DateTimeZone('Europe/London')); echo $myTime->format('r')."\n"; $myTime->setTimeZone(new DateTimeZone('Asia/Calcutta')); echo $myTime->format('r');
Output for 5.2.0 - 5.3.18, 5.3.20 - 5.6.30, hhvm-3.11.1 - 3.13.2, hhvm-3.20.2, 7.0.0 - 7.1.8
Tue, 22 Aug 2017 08:51:36 +0100 Tue, 22 Aug 2017 13:21:36 +0530
Output for 5.3.19, hhvm-3.10.1, hhvm-3.15.4 - 3.19.2, hhvm-3.21.0
Tue, 22 Aug 2017 08:51:37 +0100 Tue, 22 Aug 2017 13:21:37 +0530
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/F9O5d on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/F9O5d on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/F9O5d on line 3