UnhandledMatchError

(PHP 8)

简介

当传递给 match 表达式的主体未被 match 表达式的任何分支处理时, 将会抛出 UnhandledMatchError

类摘要

classUnhandledMatchErrorextendsError {
protectedstring$message = "";
privatestring$string = "";
protectedint$code;
protectedstring$file = "";
protectedint$line;
privatearray$trace = [];
private?Throwable$previous = null;
publicError::__construct(string$message = "", int$code = 0, ?Throwable$previous = null)
finalpublicError::getCode(): int
finalpublicError::getFile(): string
finalpublicError::getLine(): int
finalpublicError::getTrace(): array
}
To Top