3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('date.timezone', 'Asia/Shanghai'); var_dump(test('2019-10-27 07:55:00')); var_dump(test('2019-10-27 08:55:00')); var_dump(test('2019-10-27 09:55:00')); function test($testDate) { $format = 'Y-m-d H:i:s I'; $timezone = 'Europe/Paris'; $date = new DateTime($testDate); $date->setTimezone(new DateTimeZone($timezone)); return $date->format($format); }
Output for git.master, git.master_jit, rfc.property-hooks
string(21) "2019-10-27 01:55:00 1" string(21) "2019-10-27 02:55:00 1" string(21) "2019-10-27 02:55:00 0"

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
20.23 ms | 401 KiB | 8 Q