3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $capitalcities['England'] = 'London'; $capitalcities['Wales'] = 'Cardiff'; $capitalcities['Scotland'] = 'Edinburgh'; ksort($capitalcities); var_dump($capitalcities); asort($capitalcities); var_dump($capitalcities); ?>
based on 1masm
Output for 4.3.0 - 7.2.0
array(3) { ["England"]=> string(6) "London" ["Scotland"]=> string(9) "Edinburgh" ["Wales"]=> string(7) "Cardiff" } array(3) { ["Wales"]=> string(7) "Cardiff" ["Scotland"]=> string(9) "Edinburgh" ["England"]=> string(6) "London" }