3v4l.org

run code in 300+ PHP versions simultaneously
<?php $startdate = '2017-08-04'; $datetime1 = new DateTime($startdate); $datetime2 = new DateTime('2017-08-07'); $interval = $datetime1->diff($datetime2); $days = $interval->format('%a'); $arr =array(); for($i=0;$i<=$days;$i++){ $day = date("w Y-m-d l", strtotime($startdate) + $i*86400); if((int)$day[0] >= 1 && (int)$day[0] <= 5 ) $arr[] = $day; } var_dump($arr); echo "days excluding sat-sundays " . count($arr);
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { [0]=> string(19) "5 2017-08-04 Friday" [1]=> string(19) "1 2017-08-07 Monday" } days excluding sat-sundays 2

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:
32.14 ms | 405 KiB | 5 Q