3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isWeekend($date) { return $date->format('N') >= 6; } $periodStartDate = new \DateTime('today'); $periodStartDate = $periodStartDate->modify('-5 days'); $periodEndDate = new \DateTime('today'); $periodEndDate->modify('+1 day'); $period = new \DatePeriod($periodStartDate, \DateInterval::createFromDateString('1 day'), $periodEndDate); foreach ($period as $date) { echo $date->format('Y-m-d'); echo('<br>'); //if ($this->getDayOffInDaysOffByDate($daysOff, $date) || $this->isWeekend($date)) { // $daysCount--; //} }
Output for git.master, git.master_jit, rfc.property-hooks
2017-06-30<br>2017-07-01<br>2017-07-02<br>2017-07-03<br>2017-07-04<br>2017-07-05<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:
52.02 ms | 401 KiB | 8 Q