3v4l.org

run code in 300+ PHP versions simultaneously
<?php $period = new \DatePeriod(new \DateTime('-7 days'), new \DateInterval('P1D'), new \DateTime()); var_dump(iterator_to_array($period));
Output for git.master
array(7) { [0]=> object(DateTime)#3 (3) { ["date"]=> string(26) "2014-08-19 20:38:40.003650" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [1]=> object(DateTime)#8 (3) { ["date"]=> string(26) "2014-08-20 20:38:40.003650" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [2]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2014-08-21 20:38:40.003650" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [3]=> object(DateTime)#9 (3) { ["date"]=> string(26) "2014-08-22 20:38:40.003650" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [4]=> object(DateTime)#10 (3) { ["date"]=> string(26) "2014-08-23 20:38:40.003650" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [5]=> object(DateTime)#11 (3) { ["date"]=> string(26) "2014-08-24 20:38:40.003650" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [6]=> object(DateTime)#12 (3) { ["date"]=> string(26) "2014-08-25 20:38:40.003650" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } }
Output for git.master_jit
array(7) { [0]=> object(DateTime)#3 (3) { ["date"]=> string(26) "2014-08-19 20:38:40.005197" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [1]=> object(DateTime)#8 (3) { ["date"]=> string(26) "2014-08-20 20:38:40.005197" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [2]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2014-08-21 20:38:40.005197" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [3]=> object(DateTime)#9 (3) { ["date"]=> string(26) "2014-08-22 20:38:40.005197" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [4]=> object(DateTime)#10 (3) { ["date"]=> string(26) "2014-08-23 20:38:40.005197" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [5]=> object(DateTime)#11 (3) { ["date"]=> string(26) "2014-08-24 20:38:40.005197" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [6]=> object(DateTime)#12 (3) { ["date"]=> string(26) "2014-08-25 20:38:40.005197" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } }
Output for rfc.property-hooks
array(7) { [0]=> object(DateTime)#3 (3) { ["date"]=> string(26) "2014-08-19 20:38:40.005214" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [1]=> object(DateTime)#8 (3) { ["date"]=> string(26) "2014-08-20 20:38:40.005214" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [2]=> object(DateTime)#2 (3) { ["date"]=> string(26) "2014-08-21 20:38:40.005214" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [3]=> object(DateTime)#9 (3) { ["date"]=> string(26) "2014-08-22 20:38:40.005214" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [4]=> object(DateTime)#10 (3) { ["date"]=> string(26) "2014-08-23 20:38:40.005214" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [5]=> object(DateTime)#11 (3) { ["date"]=> string(26) "2014-08-24 20:38:40.005214" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } [6]=> object(DateTime)#12 (3) { ["date"]=> string(26) "2014-08-25 20:38:40.005214" ["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:
38.59 ms | 404 KiB | 8 Q