Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Throwable::getTraceAsStringThrowable::__toString>
^ThrowableLast updated: Mon, 26 Oct 2026

Throwable::getPrevious

(PHP 7, PHP 8)

Throwable::getPrevious — Returns the previous Throwable

Description

public function Throwable::getPrevious(): ?Throwable

Returns any previous Throwable (for example, one provided as the third parameter to Exception::__construct()).

Parameters

This function has no parameters.

Return Values

Returns the previous Throwable if available, or null otherwise.

See Also


<Throwable::getTraceAsStringThrowable::__toString>
^ThrowableLast updated: Mon, 26 Oct 2026