3v4l.org

run code in 300+ PHP versions simultaneously
<?php $month_start = new DateTime("first day of this month"); $month_end = new DateTime("last day of this month"); // find the monday on/before the start of the month $start_date = clone $month_start; $start_date->modify((1 - $start_date->format('N')) . ' days'); while ($start_date <= $month_end) { echo max($month_start, $start_date)->format('Y-m-d') . ' to ' . min($start_date->modify('+6 days'), $month_end)->format('Y-m-d') . "\n"; $start_date->modify('+1 day'); }
Output for git.master_jit, git.master, rfc.property-hooks
2023-06-01 to 2023-06-04 2023-06-05 to 2023-06-11 2023-06-12 to 2023-06-18 2023-06-19 to 2023-06-25 2023-06-26 to 2023-06-30

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:
21.35 ms | 401 KiB | 8 Q