3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getSundaysForTheMonth($y, $m) { return new DatePeriod( new DateTime("first sunday of $y-$m"), DateInterval::createFromDateString('next sunday'), new DateTime("last day of $y-$m 23:59:59") ); } // Get current Year and Month $currentYear = date('Y'); $currentMonth = date('m'); // Get month name $beginMonthName = date("F", mktime(0, 0, 0, $currentMonth, 10)); echo "Select which Sunday(s) of the month of ". $beginMonthName . " " . $currentYear . " :\n<BR>"; $i=0; // Display all Sundays for 3 months foreach (getSundaysForTheMonth($currentYear, $currentMonth) as $sunday) { $thisSunday = $sunday->format("m - d - Y"); echo "<input type=\"checkbox\" name=\"date[]\" value=\"$thisSunday\">$thisSunday\n<BR>"; $i++; }
Output for git.master, git.master_jit, rfc.property-hooks
Select which Sunday(s) of the month of August 2021 : <BR><input type="checkbox" name="date[]" value="08 - 01 - 2021">08 - 01 - 2021 <BR><input type="checkbox" name="date[]" value="08 - 08 - 2021">08 - 08 - 2021 <BR><input type="checkbox" name="date[]" value="08 - 15 - 2021">08 - 15 - 2021 <BR><input type="checkbox" name="date[]" value="08 - 22 - 2021">08 - 22 - 2021 <BR><input type="checkbox" name="date[]" value="08 - 29 - 2021">08 - 29 - 2021 <BR>

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.34 ms | 406 KiB | 5 Q