3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $year = 2015; $week = 46; $dto = new DateTime(); $dto-> setISODate($year, $week); $ret['week_start'] = $dto->format('Y-m-d'); $dto->modify('+6 days'); $ret['week_end'] = $dto->format('Y-m-d'); echo $ret[week_start];
based on oWFFp
Output for 7.2.0
Warning: Use of undefined constant week_start - assumed 'week_start' (this will throw an Error in a future version of PHP) in /in/LPngl on line 10 2015-11-09
Output for 5.3.19 - 7.1.10
Notice: Use of undefined constant week_start - assumed 'week_start' in /in/LPngl on line 10 2015-11-09