3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php for($i = 1; $i < 10; $i++) { $today = strtotime("+$i days"); $quote_for = strtotime('wednesday this week',strtotime("+$i days")); $diff = floor(($quote_for - $today)/86400); // difference in days echo "On " . date('l \t\h\e jS',$today) . " the shipping quote will be for " . date('l \t\h\e jS', $quote_for) . " which is " . abs($diff) . " days " . ($diff <0?"before":"after") . " today. " . date('Y-m-d',$today) . " - " . date('Y-m-d',$quote_for) . "\n"; }
Output for 5.6.23 - 5.6.28, 7.0.8 - 7.1.0
On Tuesday the 29th the shipping quote will be for Wednesday the 30th which is 0 days after today. 2013-01-29 - 2013-01-30 On Wednesday the 30th the shipping quote will be for Wednesday the 30th which is 1 days before today. 2013-01-30 - 2013-01-30 On Thursday the 31st the shipping quote will be for Wednesday the 30th which is 2 days before today. 2013-01-31 - 2013-01-30 On Friday the 1st the shipping quote will be for Wednesday the 30th which is 3 days before today. 2013-02-01 - 2013-01-30 On Saturday the 2nd the shipping quote will be for Wednesday the 30th which is 4 days before today. 2013-02-02 - 2013-01-30 On Sunday the 3rd the shipping quote will be for Monday the 28th which is 7 days before today. 2013-02-03 - 2013-01-28 On Monday the 4th the shipping quote will be for Wednesday the 6th which is 1 days after today. 2013-02-04 - 2013-02-06 On Tuesday the 5th the shipping quote will be for Wednesday the 6th which is 0 days after today. 2013-02-05 - 2013-02-06 On Wednesday the 6th the shipping quote will be for Wednesday the 6th which is 1 days before today. 2013-02-06 - 2013-02-06
Output for 5.3.0 - 5.6.22, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.0.7
On Tuesday the 29th the shipping quote will be for Wednesday the 30th which is 0 days after today. 2013-01-29 - 2013-01-30 On Wednesday the 30th the shipping quote will be for Wednesday the 30th which is 1 days before today. 2013-01-30 - 2013-01-30 On Thursday the 31st the shipping quote will be for Wednesday the 30th which is 2 days before today. 2013-01-31 - 2013-01-30 On Friday the 1st the shipping quote will be for Wednesday the 30th which is 3 days before today. 2013-02-01 - 2013-01-30 On Saturday the 2nd the shipping quote will be for Wednesday the 30th which is 4 days before today. 2013-02-02 - 2013-01-30 On Sunday the 3rd the shipping quote will be for Wednesday the 6th which is 2 days after today. 2013-02-03 - 2013-02-06 On Monday the 4th the shipping quote will be for Wednesday the 6th which is 1 days after today. 2013-02-04 - 2013-02-06 On Tuesday the 5th the shipping quote will be for Wednesday the 6th which is 0 days after today. 2013-02-05 - 2013-02-06 On Wednesday the 6th the shipping quote will be for Wednesday the 6th which is 1 days before today. 2013-02-06 - 2013-02-06
Output for 4.3.5 - 4.4.9, 5.0.3 - 5.0.5, 5.2.0 - 5.2.17
On Tuesday the 29th the shipping quote will be for Wednesday the 30th which is 0 days after today. 2013-01-29 - 2013-01-30 On Wednesday the 30th the shipping quote will be for Wednesday the 30th which is 1 days before today. 2013-01-30 - 2013-01-30 On Thursday the 31st the shipping quote will be for Wednesday the 6th which is 5 days after today. 2013-01-31 - 2013-02-06 On Friday the 1st the shipping quote will be for Wednesday the 6th which is 4 days after today. 2013-02-01 - 2013-02-06 On Saturday the 2nd the shipping quote will be for Wednesday the 6th which is 3 days after today. 2013-02-02 - 2013-02-06 On Sunday the 3rd the shipping quote will be for Wednesday the 6th which is 2 days after today. 2013-02-03 - 2013-02-06 On Monday the 4th the shipping quote will be for Wednesday the 6th which is 1 days after today. 2013-02-04 - 2013-02-06 On Tuesday the 5th the shipping quote will be for Wednesday the 6th which is 0 days after today. 2013-02-05 - 2013-02-06 On Wednesday the 6th the shipping quote will be for Wednesday the 6th which is 1 days before today. 2013-02-06 - 2013-02-06
Output for 5.1.0 - 5.1.6
On Tuesday the 29th the shipping quote will be for Wednesday the 30th which is 0 days after today. 2013-01-29 - 2013-01-30 On Wednesday the 30th the shipping quote will be for Wednesday the 6th which is 6 days after today. 2013-01-30 - 2013-02-06 On Thursday the 31st the shipping quote will be for Wednesday the 6th which is 5 days after today. 2013-01-31 - 2013-02-06 On Friday the 1st the shipping quote will be for Wednesday the 6th which is 4 days after today. 2013-02-01 - 2013-02-06 On Saturday the 2nd the shipping quote will be for Wednesday the 6th which is 3 days after today. 2013-02-02 - 2013-02-06 On Sunday the 3rd the shipping quote will be for Wednesday the 6th which is 2 days after today. 2013-02-03 - 2013-02-06 On Monday the 4th the shipping quote will be for Wednesday the 6th which is 1 days after today. 2013-02-04 - 2013-02-06 On Tuesday the 5th the shipping quote will be for Wednesday the 6th which is 0 days after today. 2013-02-05 - 2013-02-06 On Wednesday the 6th the shipping quote will be for Wednesday the 13th which is 6 days after today. 2013-02-06 - 2013-02-13
Output for 5.0.0 - 5.0.2
On Tuesday the 29th the shipping quote will be for Wednesday the 30th which is 1 days after today. 2013-01-29 - 2013-01-30 On Wednesday the 30th the shipping quote will be for Wednesday the 30th which is 0 days after today. 2013-01-30 - 2013-01-30 On Thursday the 31st the shipping quote will be for Wednesday the 6th which is 6 days after today. 2013-01-31 - 2013-02-06 On Friday the 1st the shipping quote will be for Wednesday the 6th which is 5 days after today. 2013-02-01 - 2013-02-06 On Saturday the 2nd the shipping quote will be for Wednesday the 6th which is 4 days after today. 2013-02-02 - 2013-02-06 On Sunday the 3rd the shipping quote will be for Wednesday the 6th which is 3 days after today. 2013-02-03 - 2013-02-06 On Monday the 4th the shipping quote will be for Wednesday the 6th which is 2 days after today. 2013-02-04 - 2013-02-06 On Tuesday the 5th the shipping quote will be for Wednesday the 6th which is 1 days after today. 2013-02-05 - 2013-02-06 On Wednesday the 6th the shipping quote will be for Wednesday the 6th which is 0 days after today. 2013-02-06 - 2013-02-06
Output for 4.3.0 - 4.3.4
On Tuesday the 29th the shipping quote will be for Wednesday the 6th which is 7 days after today. 2013-01-29 - 2013-02-06 On Wednesday the 30th the shipping quote will be for Wednesday the 6th which is 6 days after today. 2013-01-30 - 2013-02-06 On Thursday the 31st the shipping quote will be for Wednesday the 13th which is 12 days after today. 2013-01-31 - 2013-02-13 On Friday the 1st the shipping quote will be for Wednesday the 13th which is 11 days after today. 2013-02-01 - 2013-02-13 On Saturday the 2nd the shipping quote will be for Wednesday the 13th which is 10 days after today. 2013-02-02 - 2013-02-13 On Sunday the 3rd the shipping quote will be for Wednesday the 13th which is 9 days after today. 2013-02-03 - 2013-02-13 On Monday the 4th the shipping quote will be for Wednesday the 13th which is 8 days after today. 2013-02-04 - 2013-02-13 On Tuesday the 5th the shipping quote will be for Wednesday the 13th which is 7 days after today. 2013-02-05 - 2013-02-13 On Wednesday the 6th the shipping quote will be for Wednesday the 13th which is 6 days after today. 2013-02-06 - 2013-02-13