3v4l.org

run code in 300+ PHP versions simultaneously
<?php $begin_date = '2019-12-30'; $date = new DateTime($begin_date); $original_date = clone $date; for ($i = 1; $i <= 5; $i++) { echo '<p>'.$date->format("Y-m-d")."</p>\n"; $date->modify("last day of next month"); if ($date->format("d") > $original_date->format("d")) { $date->modify("-".($date->format("d") - $original_date->format("d"))." day"); } }
Output for git.master, git.master_jit, rfc.property-hooks
<p>2019-12-30</p> <p>2020-01-30</p> <p>2020-02-29</p> <p>2020-03-30</p> <p>2020-04-30</p>

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:
26.02 ms | 405 KiB | 5 Q