3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dt = new DateTime('2021-11-25T16:46:15+0200'); var_dump($dt->format('Y-m-d H:i:s')); $dt->setTimeZone(new DateTimeZone('UTC')); var_dump($dt->format('Y-m-d H:i:s')); $dt->setTimeZone(new DateTimeZone('-0600')); var_dump($dt->format('Y-m-d H:i:s')); $dt->setTimeZone(new DateTimeZone('UTC')); var_dump($dt->format('Y-m-d H:i:s'));
Output for git.master, git.master_jit
string(19) "2021-11-25 16:46:15" string(19) "2021-11-25 14:46:15" string(19) "2021-11-25 08:46:15" string(19) "2021-11-25 14:46:15"

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:
14.03 ms | 459 KiB | 5 Q