3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo date("Y-m-d", strtotime("2009-03-20 +5 weekday"))."\n"; //EXPECT: 2009-03-27. RETURNS: 2009-03-29 echo date("l", strtotime("friday +5 weekday"))."\n"; //EXPECT: "Friday". RETURNS: "Sunday" ## Works fine as long as start date is not a weekend... echo date("l", strtotime("thursday +6 weekday"))."\n"; //EXPECT: "Friday". RETURNS: "Friday" ## ...OR end date does not land on weekend: echo date("l", strtotime("friday +4 weekday"))."\n"; //EXPECT: "Thursday". RETURNS: "Thursday" ?>
Output for git.master, git.master_jit, rfc.property-hooks
2009-03-27 Friday Friday Thursday

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