3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $test_cases = array( /* 0 */ array( 'A' , 'B' , 'C' ), /* 1 */ array( 'A' , 'C' , 'B' ), /* 2 */ array( 'B' , 'A' , 'C' ), /* 3 */ array( 'B' , 'C' , 'A' ), ); array_walk($test_cases, 'sort'); var_dump($test_cases);
Output for hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
array(4) { [0]=> array(3) { [0]=> string(1) "A" [1]=> string(1) "B" [2]=> string(1) "C" } [1]=> array(3) { [0]=> string(1) "A" [1]=> string(1) "C" [2]=> string(1) "B" } [2]=> array(3) { [0]=> string(1) "A" [1]=> string(1) "B" [2]=> string(1) "C" } [3]=> array(3) { [0]=> string(1) "A" [1]=> string(1) "B" [2]=> string(1) "C" } }
Output for 4.3.0 - 5.6.28
array(4) { [0]=> array(3) { [0]=> string(1) "A" [1]=> string(1) "B" [2]=> string(1) "C" } [1]=> array(3) { [0]=> string(1) "B" [1]=> string(1) "C" [2]=> string(1) "A" } [2]=> array(3) { [0]=> string(1) "A" [1]=> string(1) "B" [2]=> string(1) "C" } [3]=> array(3) { [0]=> string(1) "A" [1]=> string(1) "B" [2]=> string(1) "C" } }