3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = '2016-11-06 12:00:00'; // sunday echo date("Y-m-d", strtotime('monday this week', strtotime($date))), "\n"; echo date("Y-m-d", strtotime('friday this week', strtotime($date))), "\n";
based on hkno7
Output for 7.0.20, 7.1.5 - 7.2.6
2016-10-31 2016-11-04
Output for 5.6.23 - 5.6.27, 7.0.8 - 7.0.12, 7.1.0
2016-10-31 2016-10-31
Output for 5.6.0 - 5.6.22, 7.0.0 - 7.0.7
2016-11-07 2016-11-11