function _isSubArrayValid($root, $path)
    {
        if (!is_array($root)) {
            return false;
        }

        foreach (explode('/', $path) as $i) {
            if (!is_array($root)) {
                return false;
            }

            if (!isset($root[$i])) {
                return true;
            }

            $root = $root[$i];
        }

        return true;
    }
function _isSubArrayValid($root, $path)
    {
        if (!is_array($root)) {
            return false;
        }

        foreach (explode('/', $path) as $i) {
            if (!is_array($root)) {
                return false;
            }

            if (!isset($root[$i])) {
                return true;
            }

            $root = $root[$i];
        }

        return true;
    }
function _isSubArrayValid ( $ root , $ path ) { if ( ! is_array ( $ root ) ) { return false ; } foreach ( explode ( '/' , $ path ) as $ i ) { if ( ! is_array ( $ root ) ) { return false ; } if ( ! isset ( $ root [ $ i ] ) ) { return true ; } $ root = $ root [ $ i ] ; } return true ; }
Check for validity of subarray

This is intended for use in conjunction with _subArrayUnchecked(),
implementing the checks included in _subArray() but without copying
a potentially large array by passing its reference by-value to is_array().

@param array $root
@param string $path
@return boolean
@access private
Check for validity of subarray