3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $your_array = array(0 =>array("codes"=>array(7,4,5),'name' => 'namesssss')); foreach($your_array as $secondArray){ foreach($secondArray as $array){ array_multisort($array); var_dump($array); } } //$ar1 = array (1002, 100, 100); //array_multisort ($ar1); //var_dump($ar1);
Output for 4.3.2 - 5.0.5, 5.1.1 - 5.6.28, 7.0.0 - 7.1.0
array(3) { [0]=> int(4) [1]=> int(5) [2]=> int(7) } Warning: array_multisort(): Argument #1 is expected to be an array or a sort flag in /in/vaeOr on line 6 string(9) "namesssss"
Output for hhvm-3.10.0 - 3.12.0
array(3) { [0]=> int(4) [1]=> int(5) [2]=> int(7) } Warning: Invalid operand type was used: array_multisort expects array(s) in /in/vaeOr on line 6 string(9) "namesssss"
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/vaeOr on line 16
Process exited with code 255.
Output for 4.3.0 - 4.3.1
array(3) { [0]=> int(4) [1]=> int(5) [2]=> int(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/vaeOr on line 6 string(9) "namesssss"