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); print_r(isWeekend($val)); } function isWeekend($date) { return (date('N', strtotime($date)) >= 6); }
Output for git.master, git.master_jit, rfc.property-hooks
2014-03-192014-03-202014-03-212014-03-2212014-03-2312014-03-242014-03-252014-03-262014-03-272014-03-282014-03-2912014-03-3012014-03-312014-04-012014-04-022014-04-032014-04-042014-04-0512014-04-0612014-04-072014-04-082014-04-092014-04-102014-04-112014-04-1212014-04-1312014-04-142014-04-152014-04-162014-04-172014-04-182014-04-1912014-04-2012014-04-212014-04-222014-04-232014-04-242014-04-252014-04-2612014-04-2712014-04-282014-04-292014-04-302014-05-012014-05-022014-05-0312014-05-0412014-05-052014-05-062014-05-072014-05-082014-05-092014-05-1012014-05-1112014-05-122014-05-132014-05-142014-05-152014-05-162014-05-1712014-05-1812014-05-19

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:
39.15 ms | 402 KiB | 8 Q