3v4l.org

run code in 300+ PHP versions simultaneously
<?php $days = array('Monday' => array('open_at' => '09:00', 'close_at' => '18:00'), 'Tuesday' => array('open_at' => '11:00', 'close_at' => '14:00') ); foreach ($days as &$day) { $time = new DateTime($day['open_at']); $close = new DateTime($day['close_at']); while ($time < $close) { $day[] = $time->format('H:i'); $time->modify('+15 minutes'); } } print_r($days);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [Monday] => Array ( [open_at] => 09:00 [close_at] => 18:00 [0] => 09:00 [1] => 09:15 [2] => 09:30 [3] => 09:45 [4] => 10:00 [5] => 10:15 [6] => 10:30 [7] => 10:45 [8] => 11:00 [9] => 11:15 [10] => 11:30 [11] => 11:45 [12] => 12:00 [13] => 12:15 [14] => 12:30 [15] => 12:45 [16] => 13:00 [17] => 13:15 [18] => 13:30 [19] => 13:45 [20] => 14:00 [21] => 14:15 [22] => 14:30 [23] => 14:45 [24] => 15:00 [25] => 15:15 [26] => 15:30 [27] => 15:45 [28] => 16:00 [29] => 16:15 [30] => 16:30 [31] => 16:45 [32] => 17:00 [33] => 17:15 [34] => 17:30 [35] => 17:45 ) [Tuesday] => Array ( [open_at] => 11:00 [close_at] => 14:00 [0] => 11:00 [1] => 11:15 [2] => 11:30 [3] => 11:45 [4] => 12:00 [5] => 12:15 [6] => 12:30 [7] => 12:45 [8] => 13:00 [9] => 13:15 [10] => 13:30 [11] => 13:45 ) )

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:
36.23 ms | 409 KiB | 5 Q