3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(date('r', strtotime('next tuesday', strtotime('2014-02-28 - 4 days')))); var_dump(date('r', strtotime('next tuesday', strtotime('2014-03-1 - 4 days'))));
Output for 5.1.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(31) "Tue, 25 Feb 2014 00:00:00 +0100" string(31) "Tue, 04 Mar 2014 00:00:00 +0100"
Output for 5.1.0 - 5.1.1
string(31) "Thu, 01 Jan 1970 01:00:00 +0100" string(31) "Thu, 01 Jan 1970 01:00:00 +0100"
Output for 4.4.0 - 4.4.9, 5.0.5
string(31) "Tue, 04 Mar 2014 00:00:00 +0100" string(31) "Tue, 11 Mar 2014 00:00:00 +0100"
Output for 4.3.0 - 4.3.11, 5.0.0 - 5.0.4
string(31) "Tue, 11 Mar 2014 00:00:00 +0100" string(31) "Tue, 18 Mar 2014 00:00:00 +0100"