为什么“延伸”和“实施”的顺序很重要? !
例如,
正确的订单first:"extends" second:"implements"
订单错误first:"implements" second:"extends"
正确的订单
// first:"extends" second:"implements"
// works fine
class Student extends Person
implements Student_Interface {
// ....
}
订单错误
// first:"implements" second:"extends"
// Give us
// Parse error: syntax error, unexpected T_EXTENDS, expecting '{'
class Student implements Student_Interface
extends Person {
// ....
}
答案 0 :(得分:0)
我从评论中了解到 这与 核心PHP语言语法
有关