3v4l.org

run code in 300+ PHP versions simultaneously
<?php $givenday = mktime(0,0,0,01,01,2013); $Monday = strtotime("Monday this week",$givenday); echo date("j M Y H:i:s", $Monday); function StartOfWeek($year, $week) { $Jan1 = mktime(1,1,1,1,1,$year); $MondayOffset = (11-date('w',$Jan1))%7-3; $desiredMonday = strtotime(($week-1) . ' weeks '.$MondayOffset.' days', $Jan1); return $desiredMonday; } echo '<br />'; echo date('Y-m-d',StartOfWeek(2013, 1));
Output for git.master, git.master_jit, rfc.property-hooks
31 Dec 2012 00:00:00<br />2012-12-31

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