3v4l.org

run code in 300+ PHP versions simultaneously
<?php $year = 2015; $period = new DatePeriod( new DateTime($year.'-01-01'), new DateInterval('P1M'), new DateTime(($year+1).'-01-01') ); foreach($period as $date){ $firstDay = $date->modify('first day of this month')->format("Y/m/d") ; $lastDay = $date->modify('last day of this month')->format("Y/m/d") ; echo "$firstDay - $lastDay \n"; }
Output for git.master, git.master_jit, rfc.property-hooks
2015/01/01 - 2015/01/31 2015/02/01 - 2015/02/28 2015/03/01 - 2015/03/31 2015/04/01 - 2015/04/30 2015/05/01 - 2015/05/31 2015/06/01 - 2015/06/30 2015/07/01 - 2015/07/31 2015/08/01 - 2015/08/31 2015/09/01 - 2015/09/30 2015/10/01 - 2015/10/31 2015/11/01 - 2015/11/30 2015/12/01 - 2015/12/31

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:
106.56 ms | 406 KiB | 5 Q