ArgumentCountError

(PHP 7 >= PHP 7.1.0, PHP 8)

Introduction

ArgumentCountError is thrown when too few arguments are passed to a user-defined function or method.

This error is also thrown when too many arguments are passed to a non-variadic built-in function.

Class synopsis

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