PHP8 ParseError
(PHP 7, PHP 8)
简介
ParseError 当解析 PHP 代码时发生错误时抛出,比如当 eval()被调用出错时。
注意: 从 PHP 7.3.0 开始,ParseError 继承自 CompileError。之前的版本,则继承自 Error。
类摘要
class ParseError extends CompileError {
/* 继承的属性 */
protected string $message = "";
private string $string = "";
protected int $code;
protected string $file = "";
protected int $line;
private array $trace = [];
private ?Throwable $previous = null;
/* 继承的方法 */
public Error::__construct(string $message = "", int $code = 0, ?Throwable $previous = null)
final public Error::getMessage(): string
final public Error::getPrevious(): ?Throwable
final public Error::getCode(): int
final public Error::getFile(): string
final public Error::getLine(): int
final public Error::getTrace(): array
final public Error::getTraceAsString(): string
public Error::__toString(): string
private Error::__clone(): void
}