3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dateString = '2015-03-21 22:22:00'; $date1 = new \DateTimeImmutable($dateString, new \DateTimeZone('America/Caracas')); echo "Timestamp America/Caracas:\t\t{$date1->getTimestamp()} \n"; $date1->setTimezone(new \DateTimeZone('UTC')); echo "Timestamp UTC (setTimezone):\t\t{$date1->getTimestamp()} \n"; $date2 = new \DateTime($dateString, new \DateTimeZone('UTC')); echo "Timestamp UTC (construct):\t\t{$date2->getTimestamp()} \n";
Output for git.master, git.master_jit, rfc.property-hooks
Timestamp America/Caracas: 1426992720 Timestamp UTC (setTimezone): 1426992720 Timestamp UTC (construct): 1426976520

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