array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'class.typeerror.php', 1 => 'TypeError', ), 'up' => array ( 0 => 'reserved.exceptions.php', 1 => '预定义异常', ), 'prev' => array ( 0 => 'class.parseerror.php', 1 => 'ParseError', ), 'next' => array ( 0 => 'class.valueerror.php', 1 => 'ValueError', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'zh', 'path' => 'language/predefined/typeerror.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 7, PHP 8)
会抛出TypeError 的情况:
版本 | 说明 |
---|---|
7.1.0 | 当在严格模式下向内置 PHP 函数传递无效数量的参数时,不再抛出 TypeError。 相反,会抛出 ArgumentCountError |