3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // $input = range(1,24); // shuffle($input); // $queues = array_chunk($input, 8); $queues = array ( 0 => array ( 0 => 8, 1 => 22, 2 => 13, 3 => 23, 4 => 12, 5 => 10, 6 => 1, 7 => 17, ), 1 => array ( 0 => 14, 1 => 20, 2 => 5, 3 => 11, 4 => 3, 5 => 21, 6 => 15, 7 => 18, ), 2 => array ( 0 => 4, 1 => 9, 2 => 19, 3 => 16, 4 => 24, 5 => 7, 6 => 6, 7 => 2, ), ); array_walk($queues, function(&$v){ sort($v); }); var_dump($queues);
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.2.6
array(3) { [0]=> array(8) { [0]=> int(1) [1]=> int(8) [2]=> int(10) [3]=> int(12) [4]=> int(13) [5]=> int(17) [6]=> int(22) [7]=> int(23) } [1]=> array(8) { [0]=> int(3) [1]=> int(5) [2]=> int(11) [3]=> int(14) [4]=> int(15) [5]=> int(18) [6]=> int(20) [7]=> int(21) } [2]=> array(8) { [0]=> int(2) [1]=> int(4) [2]=> int(6) [3]=> int(7) [4]=> int(9) [5]=> int(16) [6]=> int(19) [7]=> int(24) } }