Throwable interface

(PHP 7, PHP 8)


소개

throwable오류예외를 포함하여 throw 문을 통해 throw될 수 있는 모든 개체의 기본 인터페이스입니다.

메모: PHP 클래스는 Throwable 인터페이스를 직접 구현할 수 없으며 대신 Exception을 확장해야 합니다.


인터페이스 개요

                  
interface Throwable {
  /* Methods */
  public getMessage(): string
  public getCode(): int
  public getFile(): string
  public getLine(): int
  public getTrace(): array
  public getTraceAsString(): string
  public getPrevious(): ?Throwable
  abstract public __toString(): string
}
                  
                

목차