3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dateStamp = "2015-06-01 00:00:00"; $datesArr = []; for ($i=1; $i<21 ; $i++) { $numMonths = $i*3; $date = new DateTime($dateStamp); $date->modify('+' . $numMonths .' month'); // or you can use '-90 day' for deduct $datesArr[] = $date->format('Y-m-d h:i:s'); } echo '<pre>'; print_r($datesArr); echo '</pre>';
Output for git.master, git.master_jit, rfc.property-hooks
<pre>Array ( [0] => 2015-09-01 12:00:00 [1] => 2015-12-01 12:00:00 [2] => 2016-03-01 12:00:00 [3] => 2016-06-01 12:00:00 [4] => 2016-09-01 12:00:00 [5] => 2016-12-01 12:00:00 [6] => 2017-03-01 12:00:00 [7] => 2017-06-01 12:00:00 [8] => 2017-09-01 12:00:00 [9] => 2017-12-01 12:00:00 [10] => 2018-03-01 12:00:00 [11] => 2018-06-01 12:00:00 [12] => 2018-09-01 12:00:00 [13] => 2018-12-01 12:00:00 [14] => 2019-03-01 12:00:00 [15] => 2019-06-01 12:00:00 [16] => 2019-09-01 12:00:00 [17] => 2019-12-01 12:00:00 [18] => 2020-03-01 12:00:00 [19] => 2020-06-01 12:00:00 ) </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:
51.32 ms | 402 KiB | 8 Q