Lists of Throwable and Exception tree as of 7.2.0
Error
ArithmeticError
DivisionByZeroError
AssertionError
ParseError
TypeError
ArgumentCountError
Exception
ClosedGeneratorException
DOMException
ErrorException
IntlException
LogicException
BadFunctionCallException
BadMethodCallException
DomainException
InvalidArgumentException
LengthException
OutOfRangeException
PharException
ReflectionException
RuntimeException
OutOfBoundsException
OverflowException
PDOException
RangeException
UnderflowException
UnexpectedValueException
SodiumException
Find the script and output in the following links:
https://gist.github.com/mlocati/249f07b074a0de339d4d1ca980848e6a
https://3v4l.org/sDMsv
posted here https://php.net/manual/en/class.throwable.php| CARVIEW |
Select Language
HTTP/2 200
server: myracloud
date: Sun, 28 Dec 2025 00:23:00 GMT
content-type: text/html; charset=utf-8
content-language: en
permissions-policy: interest-cohort=()
x-frame-options: SAMEORIGIN
status: 200 OK
link: ; rel=shorturl
last-modified: Sun, 28 Dec 2025 00:08:08 GMT
vary: accept-encoding
content-encoding: gzip
expires: Sun, 28 Dec 2025 00:23:00 GMT
cache-control: max-age=0
PHP: Error - Manual
update page now
Error
(PHP 7, PHP 8)
Introduction
Error is the base class for all internal PHP errors.
Class synopsis
/* Properties */
/* Methods */
}Properties
- message
-
The error message
- code
-
The error code
- file
-
The filename where the error happened
- line
-
The line where the error happened
- previous
-
The previously thrown exception
- string
-
The string representation of the stack trace
- trace
-
The stack trace as an array
Table of Contents
- Error::__construct — Construct the error object
- Error::getMessage — Gets the error message
- Error::getPrevious — Returns previous Throwable
- Error::getCode — Gets the error code
- Error::getFile — Gets the file in which the error occurred
- Error::getLine — Gets the line in which the error occurred
- Error::getTrace — Gets the stack trace
- Error::getTraceAsString — Gets the stack trace as a string
- Error::__toString — String representation of the error
- Error::__clone — Clone the error
+add a note
User Contributed Notes 3 notes
whysteepy at gmail dot com ¶
7 years ago
dams at php dot net ¶
3 years ago
Lists of Throwable and Exception tree as of 8.1.0
Error
ArithmeticError
DivisionByZeroError
AssertionError
CompileError
ParseError
FiberError
TypeError
ArgumentCountError
UnhandledMatchError
ValueError
Exception
ClosedGeneratorException
DOMException
ErrorException
IntlException
JsonException
LogicException
BadFunctionCallException
BadMethodCallException
DomainException
InvalidArgumentException
LengthException
OutOfRangeException
PharException
ReflectionException
RuntimeException
OutOfBoundsException
OverflowException
PDOException
RangeException
UnderflowException
UnexpectedValueException
SodiumException
Find the script and output in the following links:
https://gist.github.com/mlocati/249f07b074a0de339d4d1ca980848e6a
https://3v4l.org/f8Boe
Initially posted by whysteepy at gmail dot com for PHP 7.2.0, based on the gist
JustinasMalkas ¶
10 years ago
If after PHP upgrade you're getting error "PHP Fatal error: Cannot declare class error, because the name is already in use ...", you will have to rename your "error" class.
Since PHP 7 classname "Error" is predefined and used internally.
↑ and ↓ to navigate •
Enter to select •
Esc to close • / to open
Press Enter without
selection to search using Google