ArithmeticError

(PHP 7, PHP 8)

Introduction

ArithmeticError est émit quand une erreur se produit lors d'une opération mathématique. Ces erreurs inclus les tentatives de réaliser un bitshift par un montant négatif, n'importe quel appel à intdiv() qui donnerait lieu à une valeur en dehors des bornes possibles d'un entier.

Synopsis de la classe

classArithmeticErrorextendsError {
protectedstring$message = "";
privatestring$string = "";
protectedint$code;
protectedstring$file = "";
protectedint$line;
privatearray$trace = [];
private?Throwable$previous = null;
publicError::__construct(string$message = "", int$code = 0, ?Throwable$previous = null)
finalpublicError::getCode(): int
finalpublicError::getFile(): string
finalpublicError::getLine(): int
finalpublicError::getTrace(): array
}
To Top