3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $your_array = array(0 =>array("codes"=>array(7,4,5)), 1 =>array("codes"=>array(4,45,1))); foreach ($your_array as $array){ array_multisort($littleArray); } var_dump($your_array);
Output for 5.1.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: array_multisort(): Argument #1 is expected to be an array or a sort flag in /in/NQlQ8 on line 7 Warning: array_multisort(): Argument #1 is expected to be an array or a sort flag in /in/NQlQ8 on line 7 array(2) { [0]=> array(1) { ["codes"]=> array(3) { [0]=> int(7) [1]=> int(4) [2]=> int(5) } } [1]=> array(1) { ["codes"]=> array(3) { [0]=> int(4) [1]=> int(45) [2]=> int(1) } } }
Output for hhvm-3.10.0 - 3.12.0
Warning: Invalid operand type was used: array_multisort expects array(s) in /in/NQlQ8 on line 7 Warning: Invalid operand type was used: array_multisort expects array(s) in /in/NQlQ8 on line 7 array(2) { [0]=> array(1) { ["codes"]=> array(3) { [0]=> int(7) [1]=> int(4) [2]=> int(5) } } [1]=> array(1) { ["codes"]=> array(3) { [0]=> int(4) [1]=> int(45) [2]=> int(1) } } }
Output for 5.0.4 - 5.0.5
Notice: Undefined variable: littleArray in /in/NQlQ8 on line 7 Warning: array_multisort(): Argument #1 is expected to be an array or a sort flag in /in/NQlQ8 on line 7 Notice: Undefined variable: littleArray in /in/NQlQ8 on line 7 Warning: array_multisort(): Argument #1 is expected to be an array or a sort flag in /in/NQlQ8 on line 7 array(2) { [0]=> array(1) { ["codes"]=> array(3) { [0]=> int(7) [1]=> int(4) [2]=> int(5) } } [1]=> array(1) { ["codes"]=> array(3) { [0]=> int(4) [1]=> int(45) [2]=> int(1) } } }
Output for 4.3.2 - 5.0.3
Notice: Undefined variable: littleArray in /in/NQlQ8 on line 7 Warning: array_multisort(): Argument #1 is expected to be an array or a sort flag in /in/NQlQ8 on line 7 Notice: Undefined variable: littleArray in /in/NQlQ8 on line 7 Warning: array_multisort(): Argument #1 is expected to be an array or a sort flag in /in/NQlQ8 on line 7 array(2) { [0]=> array(1) { ["codes"]=> array(3) { [0]=> int(7) [1]=> int(4) [2]=> int(5) } } [1]=> array(1) { ["codes"]=> array(3) { [0]=> int(4) [1]=> int(45) [2]=> int(1) } } }
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: littleArray in /in/NQlQ8 on line 7 Warning: array_multisort() [http://www.php.net/function.array-multisort]: Argument #1 is expected to be an array or a sort flag in /in/NQlQ8 on line 7 Notice: Undefined variable: littleArray in /in/NQlQ8 on line 7 Warning: array_multisort() [http://www.php.net/function.array-multisort]: Argument #1 is expected to be an array or a sort flag in /in/NQlQ8 on line 7 array(2) { [0]=> array(1) { ["codes"]=> array(3) { [0]=> int(7) [1]=> int(4) [2]=> int(5) } } [1]=> array(1) { ["codes"]=> array(3) { [0]=> int(4) [1]=> int(45) [2]=> int(1) } } }