0

我正在对一些代码进行故障排除,并将其从执行路径中取出,以便可以查看其他地方。

尽管代码没有被执行,但 PHP 继续将代码称为错误。它位于未调用的函数中。

这是预期的行为吗?

// not in execution path

$temp1 = $this->hash;

$temp = array('1', $temp1); // this is line 121

$this->database_object->_pdoQuery('none', 'update_picture', $temp );

语法错误,意外的 T_LNUMBER,在第121 行的/home/foo/public_html/dev/foo/source/class.MAppPicture.php中需要']'

4

1 回答 1

4

在访问或包含时,必须先解析整个文件。这会产生一个错误,因为它是一个解析时间错误,并且由于语法错误,php 无法理解整个文件。

于 2013-06-12T15:54:03.660 回答