3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a1=array("a"=>"red","b"=>"green","c"=>"blue","d"=>"yellow"); $a2=array("a"=>"purple","b"=>"orange"); print_r(array_splice($a1[0])); print_r $a1; ?>
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected '$a1' (T_VARIABLE) in /in/P9VMC on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/P9VMC on line 5
Process exited with code 255.

preferences:
185.04 ms | 1395 KiB | 61 Q