3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(0,"a"); sort($a); var_dump($a); sort($a); var_dump($a); sort($a); var_dump($a);
Output for 7.0.0 - 7.2.0
array(2) { [0]=> int(0) [1]=> string(1) "a" } array(2) { [0]=> int(0) [1]=> string(1) "a" } array(2) { [0]=> int(0) [1]=> string(1) "a" }
Output for 5.3.22 - 5.6.28
array(2) { [0]=> string(1) "a" [1]=> int(0) } array(2) { [0]=> int(0) [1]=> string(1) "a" } array(2) { [0]=> string(1) "a" [1]=> int(0) }