3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tz = new DateTimeZone('Europe/London'); $date = new DateTimeImmutable('now', $tz); $time = 1509235200; $date1 = $date->setTimestamp($time - 1); $date2 = $date->setTimestamp($time); $date3 = $date->setTimestamp($time + 3600 - 1); $date4 = $date->setTimestamp($time + 3600); $date5 = $date->setTimestamp($time + 3600*2 - 1); var_dump($date1->format(DateTime::ATOM)); var_dump($date2->format(DateTime::ATOM)); var_dump($date3->format(DateTime::ATOM)); var_dump($date4->format(DateTime::ATOM)); var_dump($date5->format(DateTime::ATOM));
Output for git.master, git.master_jit, rfc.property-hooks
string(25) "2017-10-29T00:59:59+01:00" string(25) "2017-10-29T01:00:00+01:00" string(25) "2017-10-29T01:59:59+01:00" string(25) "2017-10-29T01:00:00+00:00" string(25) "2017-10-29T01:59:59+00:00"

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:
54.79 ms | 401 KiB | 8 Q