3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getDaysInBetween($start, $end) { $weekdays = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]; $start_found = false; $days = []; while(true) { $next = next($weekdays); $day = (empty($day) || !$next)?reset($weekdays):$next; if($day === $start) $start_found = true; if($start_found) { $days[] = $day; if($day===$end && count($days)>1) return implode(", ",$days); } } } echo getDaysInBetween("Monday","Wednesday")."\n"; echo getDaysInBetween("Monday","Monday");
Output for git.master, git.master_jit, rfc.property-hooks
Monday, Tuesday, Wednesday Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday, Monday

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