3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new DateTime('now', new DateTimezone('America/New_York')); // We want to add 2 weeks to this date $interval = new DateInterval('P2W'); $date->add($interval); // Perhaps now we wish to change the timezone? $date->setTimezone(new DateTimezone('America/Chicago')); // Echo the formatted date echo $date->format('c');
Output for git.master, git.master_jit, rfc.property-hooks
2014-04-23T16:16:09-05: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:
45.89 ms | 401 KiB | 8 Q