2014-07-17 89 views
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'); 
+0

是的,你需要PHP 5。 –

回答