3v4l.org

run code in 300+ PHP versions simultaneously
<?php $begin = 11; $finish = 3; $period = new DatePeriod( DateTime::createFromFormat('m', $begin), new DateInterval('P1M'), DateTime::createFromFormat('m', $finish + ($begin > $finish ? 13 : 1)) // add 13 or 1 for inclusive range ); foreach ($period as $obj) { $array[] = $obj->format('n'); } var_export($array);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => '11', 1 => '12', 2 => '1', 3 => '2', 4 => '3', )

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:
50.18 ms | 1501 KiB | 4 Q