Introduzione
PHP Manual
PHP Manual»Interfacce e Classi predefinite»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.

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

interface Throwable extends Stringable {
/* Metodi */
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
/* Metodi ereditati */
public function Stringable::__toString(): string
}
Versione Descrizione
8.0.0 Throwable implements Stringable now.

Indice dei contenuti

To Top