3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(date('m/d/Y', strtotime(sprintf('04/04/2014 - %d days', date('w', strtotime('04/04/2014')) + 2)))); var_dump(date('m/d/Y H:i:s', strtotime('last saturday', strtotime('2014-04-03 00:00:00')))); var_dump(date('m/d/Y H:i:s', strtotime('last saturday - 7 days')));
based on JkCZ0
Output for 5.1.2 - 7.2.6
string(10) "03/28/2014" string(19) "03/29/2014 00:00:00" string(19) "03/21/2015 00:00:00"
Output for 5.1.0 - 5.1.1
string(10) "01/01/1970" string(19) "03/29/2014 00:00:00" string(19) "01/01/1970 01:00:00"
Output for 4.3.0 - 5.0.5
string(10) "04/11/2014" string(19) "03/28/2014 23:00:00" string(19) "04/04/2015 00:00:00"