The RuntimeException class

(PHP 5 >= 5.1.0, PHP 7, PHP 8)

Introduction

Exception thrown if an error which can only be found on runtime occurs.

Class synopsis

classRuntimeExceptionextendsException {
protectedstring$message = "";
privatestring$string = "";
protectedint$code;
protectedstring$file = "";
protectedint$line;
privatearray$trace = [];
private?Throwable$previous = null;
publicException::__construct(string$message = "", int$code = 0, ?Throwable$previous = null)
finalpublicException::getCode(): int
finalpublicException::getLine(): int
}
To Top