3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ '10-7', '11-3', '11-7', '12-3', '12-7', '13-3', '13-7', '14-3', '14-7', '15-7', ]; $hours = []; $days = []; foreach ($array as $item) { [0 => $hour, 1 => $day, 0 => $hours[$hour], 1 => $days[$day]] = sscanf($item, '%d-%d'); } var_export($hours); echo "\n--\n"; var_export($days);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15, ) -- array ( 7 => 7, 3 => 3, )

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