Throwable

(PHP 7, PHP 8)

Вступ

Throwable is the base interface for any object that can be thrown via a throw statement, including Error and Exception.

Зауваження:

PHP classes cannot implement the Throwable interface directly, and must instead extend Exception.

Короткий огляд iнтерфейcу

interface Throwable extends Stringable {
/* Методи */
public getMessage(): string
public getCode(): int
public getFile(): string
public getLine(): int
public getTrace(): array
public __toString(): string
/* Успадковані методи */
}

Журнал змін

Версія Опис
8.0.0 Throwable implements Stringable now.

Зміст