0
我在第16行收到以下解析錯誤:'語法錯誤,意外的T_STRING'。話雖如此,下面的代碼塊可以正確解析PHP 5.4.16,但是,不能正確解析PHP 4.4.9。思考?解析錯誤:意外的T_OBJECT_OPERATOR
對我來說,錯誤是暗示在PHP 4.4.9中不支持interface
關鍵字,但是我無法在PHP的更改日誌中找到該關鍵字。
interface iA { // line 16
public function methodA();
public function methodB();
public function methodC();
}
EDIT(提供完整的片段)
<?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');
是的,你需要PHP 5。 –