ArgumentCountError

(PHP 7 >= PHP 7.1.0, PHP 8)

简介

ArgumentCountError 当传递给用户定义的函数或方法的参数太少时被抛出。

当传递到非可变内置函数的参数太多时,也会抛出此错误。

类摘要

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