3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $lastWeek = date('Y-m-d', strtotime('-1 week')); echo date('Y-m-d', strtotime('last monday', $lastWeek)); echo "\n"; echo date('Y-m-d', strtotime('next saturday', $lastWeek));
based on eJneL
Output for 5.1.0 - 7.1.0
Notice: A non well formed numeric value encountered in /in/0GnCt on line 4 1969-12-29 Notice: A non well formed numeric value encountered in /in/0GnCt on line 6 1970-01-03
Output for 4.4.0 - 4.4.9, 5.0.5
1969-12-29 1970-01-03
Output for 4.3.0 - 4.3.11, 5.0.0 - 5.0.4
1969-12-29 1970-01-10