3v4l.org

run code in 300+ PHP versions simultaneously
<?php If(date("N")>1){ $w = date("W")+2; }Else{ $w =date("W")+1; } $y = date("Y"); $d = date("Y\WWN", strtotime($y . "W" . $w . "2")); For($i=1; $i<7;$i++){ Echo date("Y-m-d", strtotime($d)+(86400*7)*$i) ."\n"; }

preferences:
24.37 ms | 405 KiB | 5 Q