3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $foo = array('bar'); var_dump($foo[0]['book']['bar']);
Output for 5.4.0 - 7.1.0
Warning: Illegal string offset 'book' in /in/7nPEc on line 2 Warning: Illegal string offset 'bar' in /in/7nPEc on line 2 string(1) "b"
Output for 5.2.3 - 5.3.29
Fatal error: Cannot use string offset as an array in /in/7nPEc on line 2
Process exited with code 255.
Output for 5.0.0 - 5.2.2
<br /> <b>Fatal error</b>: Cannot use string offset as an array in <b>/in/7nPEc</b> on line <b>2</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.4.9
NULL