3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo "Monday, 1st week of 2016 => "; $year = 2016; $week = sprintf('%02d', 1); $dof = 1; echo date( "l, M jS, Y", strtotime($year."W".$week.$dof) ); echo "\n\n"; echo "Thursday, 7th week of 2016 => "; $year = 2016; $week = sprintf('%02d', 7); $dof = 4; echo date( "l, M jS, Y", strtotime($year."W".$week.$dof) );
based on QtjFH
Output for 5.1.0 - 7.3.1
Monday, 1st week of 2016 => Monday, Jan 4th, 2016 Thursday, 7th week of 2016 => Thursday, Feb 18th, 2016
Output for 5.0.0 - 5.0.5
Monday, 1st week of 2016 => Monday, Dec 28th, 2015 Thursday, 7th week of 2016 => Thursday, Feb 11th, 2016
Output for 4.3.0 - 4.4.9
Monday, 1st week of 2016 => Thursday, Jan 1st, 1970 Thursday, 7th week of 2016 => Thursday, Jan 1st, 1970