public static function safeReadNDArray($array, $keychain, $default = null, $regex = null, &$error = 0)
    {
        if (!is_array($keychain)) {
            return self::safeReadArray($array, $keychain, $default, $regex, $error);
        }
        $headKey = array_shift($keychain);
        if (empty($keychain)) {
            return self::safeReadArray($array, $headKey, $default, $regex, $error);
        }
        $sub_array = self::safeReadArray($array, $headKey, [], null, $error);
        if ($error !== self::REQUEST_NO_ERROR) {
            return $default;
        }
        return self::safeReadNDArray($sub_array, $keychain, $default, $regex, $error);
    }