Throwable

Introduction

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

Note:

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

Interface synopsis

Throwable extends Stringable
/* Methods */
public string Throwable::getMessage()
public int Throwable::getCode()
public string Throwable::getFile()
public int Throwable::getLine()
public array Throwable::getTrace()
public string Throwable::getTraceAsString()
public Throwablenull Throwable::getPrevious()
public string Throwable::__toString()
/* Inherited methods */
public string Stringable::__toString()

Changelog

Version Description
8.0.0 Throwable implements Stringable now.
Table of Contents