3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x[2] = 'foo'; $x[3] = 'bar'; $x[] = 'baz'; var_dump($x);
based on OZFY6
Output for 4.3.0 - 7.2.6
array(3) { [2]=> string(3) "foo" [3]=> string(3) "bar" [4]=> string(3) "baz" }