« CompileError
TypeError »

ParseError

(PHP 7, PHP 8)

はじめに

ParseError は、eval() を呼んだときなどの PHP コードのパースに失敗した場合にスローされます。

注意:

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 function Error::__construct(string $message = "", int $code = 0, ?Throwable $previous = null)
final public function Error::getMessage(): string
final public function Error::getPrevious(): ?Throwable
final public function Error::getCode(): int
final public function Error::getFile(): string
final public function Error::getLine(): int
final public function Error::getTrace(): array
final public function Error::getTraceAsString(): string
public function Error::__toString(): string
private function Error::__clone(): void
}
関連キーワード:
final   ParseError   継承   protected   private   CompileError   Throwable   message   code   previous   TypeError   eval   コード   パース   概要   extends   プロパティ   line   trace   construct   getMessage   getPrevious   getCode   getFile   getLine
関連する関数・ページ:
class.compileerror   class.ffi-exception   class.ffi-parserexception   class.typeerror   class.valueerror   class.divisionbyzeroerror