array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'class.parseerror.php', 1 => 'ParseError', ), 'up' => array ( 0 => 'reserved.exceptions.php', 1 => '预定义异常', ), 'prev' => array ( 0 => 'class.compileerror.php', 1 => 'CompileError', ), 'next' => array ( 0 => 'class.typeerror.php', 1 => 'TypeError', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'zh', 'path' => 'language/predefined/parseerror.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 7, PHP 8)
ParseError 当解析 PHP 代码时发生错误时抛出,比如当 eval()被调用出错时。
注意: 从 PHP 7.3.0 开始,ParseError 继承自 CompileError。之前的版本,则继承自 Error。