3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function get(&$var, $default = null) { return isset($var) ? $var : $default; } $arr = array( "a" => array("a1" => "av1", "a2" => "av2"), "b" => null ); var_dump($arr); $v = get($arr["b"]["b1"]); var_dump($arr);
Output for 4.3.0 - 7.2.0
array(2) { ["a"]=> array(2) { ["a1"]=> string(3) "av1" ["a2"]=> string(3) "av2" } ["b"]=> NULL } array(2) { ["a"]=> array(2) { ["a1"]=> string(3) "av1" ["a2"]=> string(3) "av2" } ["b"]=> array(1) { ["b1"]=> NULL } }