3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<!DOCTYPE html><html><body><?php$a1=array("a"=>"red","b"=>"green","c"=>"blue","d"=>"yellow");$a2=array("a"=>"purple","b"=>"orange");array_splice($a1,0,2,$a2);print_r($a1);?></body></html
based on PJP2R
Output for 5.4.0 - 5.5.15
Parse error: syntax error, unexpected '$a1' (T_VARIABLE) in /in/uS2Zl on line 1
Process exited with code 255.
Output for 4.3.0 - 5.3.29
<!DOCTYPE html><html><body><?php$a1=array("a"=>"red","b"=>"green","c"=>"blue","d"=>"yellow");$a2=array("a"=>"purple","b"=>"orange");array_splice($a1,0,2,$a2);print_r($a1);?></body></html