3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = [ 5, '5B1', 4, '4B1', 3, '3B1', 2, '2B1', 1, '1B1', ]; rsort($data); var_dump($data);
Output for 7.0.0 - 7.2.0
array(10) { [0]=> int(5) [1]=> string(3) "5B1" [2]=> int(4) [3]=> string(3) "4B1" [4]=> int(3) [5]=> string(3) "3B1" [6]=> int(2) [7]=> string(3) "2B1" [8]=> int(1) [9]=> string(3) "1B1" }
Output for 5.4.11 - 5.6.28
array(10) { [0]=> int(5) [1]=> string(3) "5B1" [2]=> string(3) "4B1" [3]=> int(4) [4]=> string(3) "3B1" [5]=> int(3) [6]=> int(2) [7]=> string(3) "2B1" [8]=> string(3) "1B1" [9]=> int(1) }
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/LVp9X on line 3
Process exited with code 255.