3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getMonths($begin, $end) { $monthsData = array(); $dateBegin = new \DateTime($begin); $dateEnd = new \DateTime($end); while ($dateBegin->getTimestamp() < $dateEnd->getTimestamp()) { $monthsData[] = $dateBegin->format('m/Y'); $dateBegin->add(new \DateInterval('P1M')); } //ksort($monthsData); return $monthsData; } $monthsData = getMonths('2018-05-01', '2020-01-01' ); $grid = array(); foreach ($monthsData as $month) { $grid[$month]['montant'] = 0; } var_dump($grid[$month]);
Output for git.master_jit, git.master, rfc.property-hooks
array(1) { ["montant"]=> int(0) }

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:
63.9 ms | 401 KiB | 8 Q