php类InvalidArgumentException异常是如何确定参数类型的


php class InvalidArgumentException exception is how to determine the parameter type?

php异常类InvalidArgumentException如何使用。我无法区分这个类与其他异常类的区别。他具体在什么情况下使用?是如何确定参数类型。即使无法确定参数类型,也会抛出异常。

Invalidargumentexception被抛出如果参数不是预期的类型。

From the documentation .

InvalidArgumentException extends LogicException {

#继承的属性

protected string $message ;
protected int $code ;
protected string $file ;
protected int $line ;

继承的方法

final public string Exception::getMessage ( void )
final public Exception Exception::getPrevious ( void )
final public mixed Exception::getCode ( void )
final public string Exception::getFile ( void )
final public int Exception::getLine ( void )
final public array Exception::getTrace ( void )

final public string Exception::getTraceAsString ( void )
public string Exception::__toString ( void )

final private void Exception::__clone ( void )

}