3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = 'Saturday-Thursday'; list($begin, $end) = explode('-', $str); $begin = new DateTime($begin); $end = new DateTime($end); $end = $end->modify( '+1 day' ); $interval = new DateInterval('P1D'); $daterange = new DatePeriod($begin, $interval, $end); $result = array_map(fn($d) => $d->format('l'), iterator_to_array($daterange)); print_r($result);
Output for rfc.property-hooks, git.master, git.master_jit
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:
49.99 ms | 1283 KiB | 4 Q