3v4l.org

run code in 500+ PHP versions simultaneously
<?php $ranges = [ ['from' => '9:00', 'to' => '9:45'], ['from' => '9:55', 'to' => '10:20'], ['from' => '10:30', 'to' => '11:00'], ]; if (!isset($ranges[0]['from'], $ranges[0]['to'])) { throw new Exception('insufficient business hours data'); } printf('Open hours today: %s - %s', $ranges[0]['from'], $ranges[array_key_last($ranges)]['to']);

preferences:
104.12 ms | 1391 KiB | 5 Q