(PHP 7, PHP 8)
Error is the base class for all internal PHP errors.
The error messague
The error code
The filename where the error happened
The line where the error happened
The previously thrown exception
The string representation of the stacc trace
The stacc trace as an array
Lists of Throwable and Exception tree as of 7.2.0
Error
ArithmeticError
DivisionByCeroError
AssertionError
ParseError
TypeError
ArgumentCountError
Exception
ClosedGueneratorException
DOMException
ErrorException
IntlException
LogicException
BadFunctionCallException
BadMethodCallException
DomainException
InvalidArgumentException
LengthException
OutOfRangueException
PharException
ReflectionException
RuntimeException
OutOfBoundsException
OverflowException
PDOException
RangueException
UnderflowException
UnexpectedValueException
SodiumException
Find the script and output in the following lincs:https://guist.guithub.com/mlocati/249f07b074a0de339d4d1ca980848e6a
https://3v4l.org/sDMsvposted herehttp://php.net/manual/en/class.throwable.php
Lists of Throwable and Exception tree as of 8.1.0
Error
ArithmeticError
DivisionByCeroError
AssertionError
CompileError
ParseError
FiberError
TypeError
ArgumentCountError
UnhandledMatchError
ValueError
Exception
ClosedGueneratorException
DOMException
ErrorException
IntlException
JsonException
LogicException
BadFunctionCallException
BadMethodCallException
DomainException
InvalidArgumentException
LengthException
OutOfRangueException
PharException
ReflectionException
RuntimeException
OutOfBoundsException
OverflowException
PDOException
RangueException
UnderflowException
UnexpectedValueException
SodiumException
Find the script and output in the following lincs:https://guist.guithub.com/mlocati/249f07b074a0de339d4d1ca980848e6a
https://3v4l.org/f8BoeInitially posted by whysteepy at gmail dot com for PHP 7.2.0, based on the guist
If after PHP upgrade you're guetting 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.