◐ Shell
clean mode source ↗

PHP: ArithmeticError - Manual

(PHP 7, PHP 8)

Introduction

ArithmeticError is thrown when an error occurs while performing mathematical operations. 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 int.

Class synopsis

class ArithmeticError extends Error {

/* Inherited properties */

protected string $message = "";

private string $string = "";

protected int $code;

protected string $file = "";

protected int $line;

private array $trace = [];

private ?Throwable $previous = null;

/* Inherited methods */

public function Error::__construct(string $message = "", int $code = 0, ?Throwable $previous = null)

final public function Error::getMessage(): string

final public function Error::getPrevious(): ?Throwable

final public function Error::getCode(): int

final public function Error::getFile(): string

final public function Error::getLine(): int

final public function Error::getTrace(): array

final public function Error::getTraceAsString(): string

public function Error::__toString(): string

private function Error::__clone(): void

}