3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cdate=date('2015-06-20'); $weekno = date('W',strtotime($cdate)); $yr = date('Y',strtotime($cdate)); $dt = $yr."W".$weekno ; echo date('Y-m-d',strtotime( $dt)); $dtt=strtotime("+6 days", strtotime($dt)); echo date('Y-m-d', $dtt); ?>

preferences:
49.1 ms | 402 KiB | 5 Q