3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $somearray = array( 'item1' => array( 'subitem1' => 'Some value', 'subitem2' => 'Some other value', 'subitem3' => array( 'subsubitem' => 'A sub value' ) ), 'item2' => 'a different value' ); $map = "item1/subitem3/subsubitem"; $map = "['" . str_replace("/","']['",$map . "']"; eval("$result = $somearray" . $map); echo $result;
Output for 5.3.0 - 5.4.22
Parse error: syntax error, unexpected ';' in /in/IgvZQ on line 18
Process exited with code 255.