3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(array('errors' => array(), 'path' => '/some/path/to/a/file.jpg'), array('errors' => array(), 'path' => '/yet/another/path.jpg')); var_dump($a); echo $a[0][0]['path'];
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
array(2) { [0]=> array(2) { ["errors"]=> array(0) { } ["path"]=> string(24) "/some/path/to/a/file.jpg" } [1]=> array(2) { ["errors"]=> array(0) { } ["path"]=> string(21) "/yet/another/path.jpg" } } Notice: Undefined offset: 0 in /in/8KbY6 on line 5
Output for hhvm-3.10.0 - 3.12.0
array(2) { [0]=> array(2) { ["errors"]=> array(0) { } ["path"]=> string(24) "/some/path/to/a/file.jpg" } [1]=> array(2) { ["errors"]=> array(0) { } ["path"]=> string(21) "/yet/another/path.jpg" } } Notice: Undefined index: 0 in /in/8KbY6 on line 5
Output for 4.3.0 - 5.2.17
array(2) { [0]=> array(2) { ["errors"]=> array(0) { } ["path"]=> string(24) "/some/path/to/a/file.jpg" } [1]=> array(2) { ["errors"]=> array(0) { } ["path"]=> string(21) "/yet/another/path.jpg" } } Notice: Undefined offset: 0 in /in/8KbY6 on line 5