3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); ini_set('display_errors', 1); date_default_timezone_set('UTC'); //to be sure that DateInterval will work as intended $today = new DateTime; $fist_day_of_the_month = $today->format('Y-m-01'); $range = new DatePeriod( new DateTime($fist_day_of_the_month), //begin new DateInterval('P1M'), //interval new DateTime($fist_day_of_the_month.' +24 month') //end ); foreach ($range as $date) { echo $date->format('Y-m-d'), PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
2014-04-01 2014-05-01 2014-06-01 2014-07-01 2014-08-01 2014-09-01 2014-10-01 2014-11-01 2014-12-01 2015-01-01 2015-02-01 2015-03-01 2015-04-01 2015-05-01 2015-06-01 2015-07-01 2015-08-01 2015-09-01 2015-10-01 2015-11-01 2015-12-01 2016-01-01 2016-02-01 2016-03-01

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.06 ms | 401 KiB | 8 Q