3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = ['banana','apple','banana','banana','apple']; asort($a); print_r($a);
based on bVVIj
Output for 7.0.0 - 7.2.0
Array ( [1] => apple [4] => apple [0] => banana [2] => banana [3] => banana )
Output for 5.4.10 - 5.6.28
Array ( [4] => apple [1] => apple [3] => banana [2] => banana [0] => banana )
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/4SXDZ on line 2
Process exited with code 255.