(PHP 7)


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


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

Sommaire de l'Interface

Throwable {
/* Méthodes */
abstract public string getMessage ( void )
abstract public int getCode ( void )
abstract public string getFile ( void )
abstract public int getLine ( void )
abstract public array getTrace ( void )
abstract public string getTraceAsString ( void )
abstract public Throwable getPrevious ( void )
abstract public string __toString ( void )


add a note add a note

User Contributed Notes 1 note

mlocati at gmail dot com
1 year ago
I wrote a simple script that prints out the Throwable and Exception tree for every PHP version.

You can find this script here:

And its output is here:
To Top