3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dates = ['2017-05-21 01:00:00.000Z', '2017-05-21 10:00:00.000Z', '2017-05-21 23:00:00.000Z', '2017-05-22 03:00:00.000Z']; $amsterdam = new DateTimezone('Europe/Amsterdam'); $newYork = new DateTimezone('America/New_York'); foreach ($dates as $date) { echo ((new DateTime($date))->setTimezone($amsterdam)->format('d/m/Y H:i:s')), PHP_EOL; echo ((new DateTime($date))->setTimezone($newYork)->format('d/m/Y H:i:s')), PHP_EOL, PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
21/05/2017 03:00:00 20/05/2017 21:00:00 21/05/2017 12:00:00 21/05/2017 06:00:00 22/05/2017 01:00:00 21/05/2017 19:00:00 22/05/2017 05:00:00 21/05/2017 23: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:
56.01 ms | 401 KiB | 8 Q