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('c'); $a['a'] = "new a"; $a[] = "second value with implicit key"; $a['b'] = "replaced b"; var_export($a);
Output for 7.1.0 - 7.1.15, 7.2.0 - 7.2.3
Parse error: syntax error, unexpected ')', expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /in/OI1pN on line 4
Process exited with code 255.

preferences:
166.82 ms | 1395 KiB | 27 Q