3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fillStart = strtotime("2019-07-23 00:15:00"); $fillEnd = strtotime("2019-09-23 13:00:00"); $gapStart = strtotime("2019-05-23 00:15:00"); $gapEnd = strtotime("2019-06-23 13:00:00"); // $wdtStart = date("l H:i:s", $gapStart); if (date("l H:i:s", $fillStart) == $wdtStart) { // already good $fillStartModified = $fillStart; } else { // move forward $fillStartModified = strtotime("next {$wdtStart}", $fillStart); } $wdtEnd = date("l H:i:s", $gapEnd); if (date("l H:i:s", $fillEnd) == $wdtEnd) { // already good $fillEndModified = $fillEnd; } else { // move backward $fillEndModified = strtotime("last {$wdtEnd}", $fillEnd); } printf("Start %s adjusted for %s = %s\n", date("l Y-m-d H:i:s", $fillStart), $wdtStart, date("l Y-m-d H:i:s", $fillStartModified)); printf("End %s adjusted for %s = %s\n", date("l Y-m-d H:i:s", $fillEnd), $wdtEnd, date("l Y-m-d H:i:s", $fillEndModified));
Output for git.master, git.master_jit, rfc.property-hooks
Start Tuesday 2019-07-23 00:15:00 adjusted for Thursday 00:15:00 = Thursday 2019-07-25 00:15:00 End Monday 2019-09-23 13:00:00 adjusted for Sunday 13:00:00 = Sunday 2019-09-22 13:00:00

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