3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lastWeek = new \DateTime('-7 days'); $interval = new \DateInterval('P1D'); $period = new \DatePeriod($lastWeek, $interval, new \DateTime()); var_dump(iterator_to_array($period));
Output for git.master
array(7) { [0]=> object(DateTime)#8 (3) { ["date"]=> string(26) "2014-01-03 06:07:38.003813" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [1]=> object(DateTime)#10 (3) { ["date"]=> string(26) "2014-01-04 06:07:38.003813" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [2]=> object(DateTime)#9 (3) { ["date"]=> string(26) "2014-01-05 06:07:38.003813" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [3]=> object(DateTime)#11 (3) { ["date"]=> string(26) "2014-01-06 06:07:38.003813" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [4]=> object(DateTime)#12 (3) { ["date"]=> string(26) "2014-01-07 06:07:38.003813" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [5]=> object(DateTime)#13 (3) { ["date"]=> string(26) "2014-01-08 06:07:38.003813" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [6]=> object(DateTime)#14 (3) { ["date"]=> string(26) "2014-01-09 06:07:38.003813" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } }
Output for git.master_jit
array(7) { [0]=> object(DateTime)#8 (3) { ["date"]=> string(26) "2014-01-03 06:07:38.004089" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [1]=> object(DateTime)#10 (3) { ["date"]=> string(26) "2014-01-04 06:07:38.004089" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [2]=> object(DateTime)#9 (3) { ["date"]=> string(26) "2014-01-05 06:07:38.004089" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [3]=> object(DateTime)#11 (3) { ["date"]=> string(26) "2014-01-06 06:07:38.004089" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [4]=> object(DateTime)#12 (3) { ["date"]=> string(26) "2014-01-07 06:07:38.004089" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [5]=> object(DateTime)#13 (3) { ["date"]=> string(26) "2014-01-08 06:07:38.004089" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [6]=> object(DateTime)#14 (3) { ["date"]=> string(26) "2014-01-09 06:07:38.004089" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } }
Output for rfc.property-hooks
array(7) { [0]=> object(DateTime)#8 (3) { ["date"]=> string(26) "2014-01-03 06:07:38.003882" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [1]=> object(DateTime)#10 (3) { ["date"]=> string(26) "2014-01-04 06:07:38.003882" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [2]=> object(DateTime)#9 (3) { ["date"]=> string(26) "2014-01-05 06:07:38.003882" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [3]=> object(DateTime)#11 (3) { ["date"]=> string(26) "2014-01-06 06:07:38.003882" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [4]=> object(DateTime)#12 (3) { ["date"]=> string(26) "2014-01-07 06:07:38.003882" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [5]=> object(DateTime)#13 (3) { ["date"]=> string(26) "2014-01-08 06:07:38.003882" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [6]=> object(DateTime)#14 (3) { ["date"]=> string(26) "2014-01-09 06:07:38.003882" ["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:
46.37 ms | 404 KiB | 8 Q