3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $foo = []; $foo['bar']['baz'] = 5; var_dump($foo);
Output for 5.4.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(1) { ["bar"]=> array(1) { ["baz"]=> int(5) } }
Output for 5.3.7 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/j8fVd on line 3
Process exited with code 255.