3v4l.org

run code in 300+ PHP versions simultaneously
<?php $yr="2014"; $dif=2012-$yr;if($dif != 0) $dif=$dif+1; $week="01"; $day="Monday"; $day=date("D",strtotime($day)); echo date("Y-m-d", strtotime($yr."W".$week."D ".$day)-(86000*$dif));; echo $dif; ?>

preferences:
33.69 ms | 402 KiB | 5 Q