3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(1 => 1, 'c'=>2, 'b'=>3, 'd'=>4); $a[] = "first value with implicit key"; unset($a['c']); $a['a'] = "new a"; $a[] = "second value with implicit key"; $a['b'] = "replaced b"; var_export($a);

preferences:
50.52 ms | 407 KiB | 5 Q