我在第 16 行收到以下解析错误:“语法错误,意外的 T_STRING”。话虽如此,下面的代码块在 PHP 5.4.16 中可以正确解析,但是在 PHP 4.4.9 中无法正确解析。想法?
对我来说,该错误表明interface
PHP 4.4.9 不支持该关键字,但是,我在 PHP 的更改日志中找不到该关键字。
interface iA { // line 16
public function methodA();
public function methodB();
public function methodC();
}
编辑(提供完整的片段)
<?php
// a comment.
// a comment.
// a comment.
// a comment.
// a comment.
// a comment.
// a comment.
if (!defined('PRODUCT_ENV')) {
exit;
}
// a comment.
interface iA {
public function methodA();
public function methodB();
public function methodC();
}
include(PRODUCT_PWD . PRODUCT_IMPLES . 'anotherfile.php');