3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(1,"2",'three'=>3); $a = [1,"2",'three'=>3]; $pieces = explode(" ","red white blue"); echo $pieces[2]; echo explode(" ","red white blue")[2];// blue echo ['big' => 'lots', 'time' => 'matters']['big']; Parse error: syntax error, unexpected '[', expecting ',' or ';'
Output for 5.4.0 - 5.4.22
Parse error: syntax error, unexpected '[', expecting ',' or ';' in /in/LMsCV on line 14
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected '[' in /in/LMsCV on line 5
Process exited with code 255.