3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array[] = "Hello"; $array[] = "World"; $array[] = "Foo"; $array[] = "Bar"; $array[] = "Baz"; var_dump($array); asort($array); var_dump($array); var_dump(array_values($array)); ?>
based on 9aiL4
Output for 4.3.0 - 7.2.0
array(5) { [0]=> string(5) "Hello" [1]=> string(5) "World" [2]=> string(3) "Foo" [3]=> string(3) "Bar" [4]=> string(3) "Baz" } array(5) { [3]=> string(3) "Bar" [4]=> string(3) "Baz" [2]=> string(3) "Foo" [0]=> string(5) "Hello" [1]=> string(5) "World" } array(5) { [0]=> string(3) "Bar" [1]=> string(3) "Baz" [2]=> string(3) "Foo" [3]=> string(5) "Hello" [4]=> string(5) "World" }