3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start_date = new DateTime('2019-01-01'); $end_date = new DateTime('2019-12-31'); $dt = clone $start_date; $dt->modify('first day of this month')->modify('+2 Sundays'); while ($dt <= $end_date) { if ($dt >= $start_date) $result[] = $dt->format('d.m.Y'); $dt->modify('first day of next month')->modify('+2 Sundays'); } print_r ($result);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => 13.01.2019 [1] => 10.02.2019 [2] => 10.03.2019 [3] => 14.04.2019 [4] => 12.05.2019 [5] => 09.06.2019 [6] => 14.07.2019 [7] => 11.08.2019 [8] => 08.09.2019 [9] => 13.10.2019 [10] => 10.11.2019 [11] => 08.12.2019 )

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:
57.53 ms | 1449 KiB | 4 Q