ArithmeticError

(PHP 7, PHP 8)

Einführung

ArithmeticError wird geworfen, wenn bei einer mathematischen Operation ein Fehler auftritt. Das ist z. B. der Fall, wenn versucht wird, eine Bitverschiebung um einen negativen Betrag durchzuführen, oder wenn ein Aufruf von intdiv() zu einem Wert außerhalb des möglichen Bereichs von int führen würde.

Klassenbeschreibung

class ArithmeticError extends Error {
/* Geerbte Eigenschaften */
protected string $message = "";
private string $string = "";
protected int $code;
protected string $file = "";
protected int $line;
private array $trace = [];
private ?Throwable $previous = null;
/* Geerbte Methoden */
public Error::__construct(string $message = "", int $code = 0, ?Throwable $previous = null)
final public Error::getMessage(): string
final public Error::getCode(): int
final public Error::getFile(): string
final public Error::getLine(): int
final public Error::getTrace(): array
private Error::__clone(): void
}