3v4l.org

run code in 300+ PHP versions simultaneously
<?php $yr="2014"; $week="01"; $day="02"; $day=date("D",strtotime($day)); $newdate= date("d-m-Y", strtotime($yr."W".$week.));; echo $newdate; $k = explode("-", $newdate); $ymd = $k[2]."-".$k[0]."-".$k[1]; echo $ymd ?>
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.25
Parse error: syntax error, unexpected ')' in /in/dUJLN on line 6
Process exited with code 255.

preferences:
181.59 ms | 1395 KiB | 62 Q