ArithmeticError
class ArithmeticError extends Error (View source)
ArithmeticError is thrown when an error occurs while performing mathematical operations.
In PHP 7.0, these errors include attempting to perform a bitshift by a negative amount, and any call to {\intdiv()} that would result in a value outside the possible bounds of an integer.
Properties
| protected | $message | The error message |
from Error |
| protected | $code | The error code |
from Error |
| protected | $file | The filename where the error happened |
from Error |
| protected | $line | The line where the error happened |
from Error |
Methods
Construct the error object.
Details
in
Error at line 461
__construct(string $message = "", int $code = 0, null|Throwable $previous = null)
Construct the error object.
in
Error at line 474
final string
getMessage()
Gets the message
in
Error at line 487
final int
getCode()
Gets the exception code
in
Error at line 495
final string
getFile()
Gets the file in which the exception occurred
in
Error at line 503
final int
getLine()
Gets the line on which the object was instantiated
in
Error at line 514
final array
getTrace()
Gets the stack trace
in
Error at line 522
final string
getTraceAsString()
Gets the stack trace as a string
in
Error at line 530
final null|Throwable
getPrevious()
Returns the previous Throwable
in
Error at line 538
string
__toString()
Gets a string representation of the thrown object
in
Error at line 558
__wakeup()
No description