3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $daysCount = 2; $daysOffset = 1; $daysCount += $daysOffset; for ($i = 0; $i < $daysCount; $i++) { // echo date('Y-m-d H:i:s \U\T\C', strtotime('-1 days 04:00')); echo date('Y-m-d H:i:s \U\T\C', strtotime( "-$i days 04:00")) . PHP_EOL; }
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
2013-08-01 04:00:00 UTC 2013-07-31 04:00:00 UTC 2013-07-30 04:00:00 UTC
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/Lg3NI on line 9 2013-08-01 04:00:00 UTCPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/Lg3NI on line 9 2013-07-31 04:00:00 UTCPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/Lg3NI on line 9 2013-07-30 04:00:00 UTCPHP_EOL