3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php for($i = 10; $i >= 1; $i--){ echo 'start:' . date('Y-m-d', strtotime('- ' . $i . ' days')) . ' - ' . date('Y-m-d', strtotime('- ' . ($i - 1) . ' days')) . '<br/>'; echo 'finish:' . date('Y-m-d', strtotime('- ' . $i . ' days')) . ' - ' . date('Y-m-d', strtotime('- ' . ($i - 1) . ' days')) . '<br/>'; $i--; }
Output for 5.1.2 - 7.1.0
start:2013-12-13 - 2013-12-14<br/>finish:2013-12-13 - 2013-12-14<br/>start:2013-12-15 - 2013-12-16<br/>finish:2013-12-15 - 2013-12-16<br/>start:2013-12-17 - 2013-12-18<br/>finish:2013-12-17 - 2013-12-18<br/>start:2013-12-19 - 2013-12-20<br/>finish:2013-12-19 - 2013-12-20<br/>start:2013-12-21 - 2013-12-22<br/>finish:2013-12-21 - 2013-12-22<br/>
Output for 5.1.0 - 5.1.1
start:1970-01-01 - 1970-01-01<br/>finish:1970-01-01 - 1970-01-01<br/>start:1970-01-01 - 1970-01-01<br/>finish:1970-01-01 - 1970-01-01<br/>start:1970-01-01 - 1970-01-01<br/>finish:1970-01-01 - 1970-01-01<br/>start:1970-01-01 - 1970-01-01<br/>finish:1970-01-01 - 1970-01-01<br/>start:1970-01-01 - 1970-01-01<br/>finish:1970-01-01 - 1970-01-01<br/>
Output for 4.3.0 - 5.0.5
start:2014-01-02 - 2014-01-01<br/>finish:2014-01-02 - 2014-01-01<br/>start:2013-12-31 - 2013-12-30<br/>finish:2013-12-31 - 2013-12-30<br/>start:2013-12-29 - 2013-12-28<br/>finish:2013-12-29 - 2013-12-28<br/>start:2013-12-27 - 2013-12-26<br/>finish:2013-12-27 - 2013-12-26<br/>start:2013-12-25 - 2013-12-24<br/>finish:2013-12-25 - 2013-12-24<br/>