3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date_from = (new \DateTime("2015-03-28")); //->setTimezone(new \DateTimeZone('UTC')); $date_to = (new \DateTime("2015-03-30")); //->setTimezone(new \DateTimeZone('UTC')); $interval = \DateInterval::createFromDateString('1 hour'); while ($date_to > $date_from) { $foo = clone $date_to; $check = $date_to->sub($interval); if ($date_to == $check) { die('error'); } else { $date_to = $check; } if ($date_to < $date_from) { $date_to = $date_from; } echo "\n\nFrom:".$date_to->format('d/m/Y H:i:s'); echo "\nTo:".$foo->format('d/m/Y H:i:s'); }
Output for git.master, git.master_jit, rfc.property-hooks
error

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
35.83 ms | 401 KiB | 8 Q