(PHP 7, PHP 8)
Error is the base class for errors that indicate programming mistakes. Such errors generally require a correction to the program rather than being handled during normal operation.
$message
$code
$previous
null
The error message
The error code
The filename where the error happened
The line where the error happened
The previously thrown exception
The string representation of the stack trace
The stack trace as an array