DivisionByZeroError

(PHP 7, PHP 8)

Introduction

DivisionByZeroError is thrown when an attempt is made to divide a number by zero.

Class synopsis

classDivisionByZeroErrorextendsArithmeticError {
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