3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = [20000 => 2, 60000 => 7, 140000 => 5, 190000 => 2]; print_r($arr); arsort($arr); print_r($arr);
Output for 7.0.0 - 7.2.0
Array ( [20000] => 2 [60000] => 7 [140000] => 5 [190000] => 2 ) Array ( [60000] => 7 [140000] => 5 [20000] => 2 [190000] => 2 )
Output for 5.4.11 - 5.6.28
Array ( [20000] => 2 [60000] => 7 [140000] => 5 [190000] => 2 ) Array ( [60000] => 7 [140000] => 5 [190000] => 2 [20000] => 2 )
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/dbNeV on line 2
Process exited with code 255.