Is it normal behavior that child class cannot implement same interface parent class implements? I got PHP v5.6
interface blueprint {
public function implement_me();
}
class one implements blueprint {
public function implement_me() {
}
}
class two extends one implements blueprint {
}
//no fatal error triggered for class two
EDIT: So above code works great no errors or warnings even though i implemented interface blueprint
in child class two
without having method impement_me()
why child class cannot implement same interface parent class implements?
if i implement another interface other than blueprint
for class two
then it works and i have to use blueprint_new
methods inside class two
otherwise fatal error triggered. This part works as intended.
interface blueprint {
public function implement_me();
}
class one implements blueprint {
public function implement_me() {
}
}
interface blueprint_new {
public function todo();
}
class two extends one implements blueprint_new {
}
//this will trigger fatal error.