3v4l.org

run code in 300+ PHP versions simultaneously
<?php $begin_date = '2019-12-30'; $date = new DateTime($begin_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") > 30) { $date->modify("-1 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:
31.52 ms | 405 KiB | 5 Q