3v4l.org

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

preferences:
24.07 ms | 405 KiB | 5 Q