3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = '2015-03-16'; // monday echo date("Y-m-d", strtotime('monday this week', strtotime($date))), "\n"; echo date("Y-m-d", strtotime('sunday this week', strtotime($date))), "\n";
based on lMSFD
Output for 4.3.5 - 5.0.5, 5.2.0 - 7.2.0
2015-03-16 2015-03-22
Output for 5.1.0 - 5.1.6
2015-03-23 2015-03-22
Output for 4.3.0 - 4.3.4
2015-03-23 2015-03-29