3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $f = array ( 0 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 1 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 2 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 3 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 4 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 5 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 6 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 7 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 8 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 9 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 10 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 11 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 12 => array ( 'subject_id' => 1, 0 => 1, 'subject_question_count' => 100, 1 => 100, ), 13 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 14 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 15 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 16 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 17 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 18 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 19 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 20 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 21 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 22 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 23 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 24 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 25 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 26 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 27 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 28 => array ( 'subject_id' => 2, 0 => 2, 'subject_question_count' => 100, 1 => 100, ), 29 => array ( 'subject_id' => 1, 0 => 1, 'subject_question_count' => 100, 1 => 100, ), 30 => array ( 'subject_id' => 3, 0 => 3, 'subject_question_count' => 100, 1 => 100, ), 31 => array ( 'subject_id' => 1, 0 => 1, 'subject_question_count' => 100, 1 => 100, ), ); var_dump($f);
based on qde8N
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.1.0 - 7.3.0rc3
array(32) { [0]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [1]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [2]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [3]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [4]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [5]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [6]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [7]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [8]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [9]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [10]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [11]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [12]=> array(4) { ["subject_id"]=> int(1) [0]=> int(1) ["subject_question_count"]=> int(100) [1]=> int(100) } [13]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [14]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [15]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [16]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [17]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [18]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [19]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [20]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [21]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [22]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [23]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [24]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [25]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [26]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [27]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [28]=> array(4) { ["subject_id"]=> int(2) [0]=> int(2) ["subject_question_count"]=> int(100) [1]=> int(100) } [29]=> array(4) { ["subject_id"]=> int(1) [0]=> int(1) ["subject_question_count"]=> int(100) [1]=> int(100) } [30]=> array(4) { ["subject_id"]=> int(3) [0]=> int(3) ["subject_question_count"]=> int(100) [1]=> int(100) } [31]=> array(4) { ["subject_id"]=> int(1) [0]=> int(1) ["subject_question_count"]=> int(100) [1]=> int(100) } }