3v4l.org

run code in 300+ PHP versions simultaneously
<?php function _getRollingMonths($months = 12) { $dates = array(); for($i=$months-1;$i>=0;$i--) { $dates[] = array( 'year' => date('Y', strtotime("first day of -$i months")), 'month' => date('m', strtotime("first day of -$i months")), 'monthName' => date('M', strtotime("first day of -$i months")) ); } return $dates; } function debug($var) { echo "<pre>"; print_r($var); echo "</pre>"; } debug(_getRollingMonths(3));
Output for git.master, git.master_jit, rfc.property-hooks
<pre>Array ( [0] => Array ( [year] => 2015 [month] => 01 [monthName] => Jan ) [1] => Array ( [year] => 2015 [month] => 02 [monthName] => Feb ) [2] => Array ( [year] => 2015 [month] => 03 [monthName] => Mar ) ) </pre>

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:
62.59 ms | 402 KiB | 8 Q