3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'Saturday-Thursday'; list($begin, $end) = array_map(fn($d) => new DateTime($d), explode('-', $str)); $end = $end->modify($end < $begin ? '+8 days':'+1 day'); $interval = new DateInterval('P1D'); $daterange = new DatePeriod($begin, $interval, $end); $result = array_map(fn($d) => $d->format('l'), [...$daterange]); print_r($result);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Saturday [1] => Sunday [2] => Monday [3] => Tuesday [4] => Wednesday [5] => Thursday )

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