3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cars=array("09:00","09:30","10:00","10:30","11:00","11:30","12:00","12:30"); $start = "09:40"; $end = "10:30"; $availability = array_combine($cars, array_map(function ($v) use ($start, $end) { return (strtotime($v) < strtotime($start) || strtotime($v) > strtotime($end)) ? 'available' : 'booked'; }, $cars)); print_r($availability);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [09:00] => available [09:30] => available [10:00] => booked [10:30] => booked [11:00] => available [11:30] => available [12:00] => available [12:30] => available )

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:
61.62 ms | 1402 KiB | 4 Q