3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start_date = '2014-3-19'; $end_date = '2014-5-19'; $begin = new DateTime( $start_date ); $end = new DateTime(date("Y-m-d",strtotime("+1 day", strtotime($end_date)))); while($begin < $end) { $period[] = $begin->format('Y-m-d'); $begin->modify('+1 day'); } foreach($period as $val) { print_r($val . '<br>'); print_r(isWeekend($val) . '<br>'); } function isWeekend($date) { return (date('N', strtotime($date)) >= 6); }
Output for git.master, git.master_jit, rfc.property-hooks
2014-03-19<br><br>2014-03-20<br><br>2014-03-21<br><br>2014-03-22<br>1<br>2014-03-23<br>1<br>2014-03-24<br><br>2014-03-25<br><br>2014-03-26<br><br>2014-03-27<br><br>2014-03-28<br><br>2014-03-29<br>1<br>2014-03-30<br>1<br>2014-03-31<br><br>2014-04-01<br><br>2014-04-02<br><br>2014-04-03<br><br>2014-04-04<br><br>2014-04-05<br>1<br>2014-04-06<br>1<br>2014-04-07<br><br>2014-04-08<br><br>2014-04-09<br><br>2014-04-10<br><br>2014-04-11<br><br>2014-04-12<br>1<br>2014-04-13<br>1<br>2014-04-14<br><br>2014-04-15<br><br>2014-04-16<br><br>2014-04-17<br><br>2014-04-18<br><br>2014-04-19<br>1<br>2014-04-20<br>1<br>2014-04-21<br><br>2014-04-22<br><br>2014-04-23<br><br>2014-04-24<br><br>2014-04-25<br><br>2014-04-26<br>1<br>2014-04-27<br>1<br>2014-04-28<br><br>2014-04-29<br><br>2014-04-30<br><br>2014-05-01<br><br>2014-05-02<br><br>2014-05-03<br>1<br>2014-05-04<br>1<br>2014-05-05<br><br>2014-05-06<br><br>2014-05-07<br><br>2014-05-08<br><br>2014-05-09<br><br>2014-05-10<br>1<br>2014-05-11<br>1<br>2014-05-12<br><br>2014-05-13<br><br>2014-05-14<br><br>2014-05-15<br><br>2014-05-16<br><br>2014-05-17<br>1<br>2014-05-18<br>1<br>2014-05-19<br><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:
35.72 ms | 403 KiB | 8 Q