Page MenuHomePhorge

function idxv($map, $path, $default)
Arcanist Technical Documentation ()

Access a sequence of array indexes, retrieving a deeply nested value if it exists or a default if it does not.

For example, idxv($dict, array('a', 'b', 'c')) accesses the key at $dict['a']['b']['c'], if it exists. If it does not, or any intermediate value is not itself an array, it returns the defualt value.

Parameters
array$mapArray to access.
list<string>$pathList of keys to access, in sequence.
wild$defaultDefault value to return.
Return
wildAccessed value, or default if the value is not accessible.