3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ 2 => 'ABC', ]; $a[] = 'DEF'; array_push($a, 'GHI'); var_dump($a);

preferences:
27.19 ms | 405 KiB | 5 Q