Вступ
PHP Manual
PHP Manual»Predefined Interfaces and Classes»Throwable

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.

interface Throwable extends Stringable {
/* Методи */
public function getMessage(): string
public function getCode(): int
public function getFile(): string
public function getLine(): int
public function getTrace(): array
public function getTraceAsString(): string
public function getPrevious(): ?Throwable
public function __toString(): string
/* Успадковані методи */
public function Stringable::__toString(): string
}
Версія Опис
8.0.0 Throwable implements Stringable now.

Зміст

To Top