3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = new \DateTime('yesterday'); $now = new \DateTime(); $end = new \DateTime('+ 6 month'); $interval = new \DateInterval('P1M'); if($now >= $start){ $period = new \DatePeriod($start, $interval, $end); foreach($period as $date){ var_dump($date); } }
Output for git.master, git.master_jit, rfc.property-hooks
object(DateTime)#10 (3) { ["date"]=> string(26) "2014-08-20 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#12 (3) { ["date"]=> string(26) "2014-09-20 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#11 (3) { ["date"]=> string(26) "2014-10-20 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#10 (3) { ["date"]=> string(26) "2014-11-20 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#12 (3) { ["date"]=> string(26) "2014-12-20 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#11 (3) { ["date"]=> string(26) "2015-01-20 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#10 (3) { ["date"]=> string(26) "2015-02-20 00:00:00.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }

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:
137.03 ms | 409 KiB | 5 Q