• Raul

    The response is: “I have a very bad feeling about this”
    PHP version: 5.2.9-2

  • Raul

    PS: Nice solution!

  • Turn on strict notices under 5.3…

  • If you have a better solution, please share it…It works in PHP 5.2.x & 5.3.x without strict notices…

  • I would say that if you need to call a method in the Grandfather class from the Son class, then it shouldn’t be overriden by Father or Son should not inherit from Father. What you are doing here is like an inheritance from Father and Grandfather, which is a bit incestuous 🙂

  • Well, it does produce a warning, static methods should always be declared as static, maybe that’s why…

    Not sure why it uses the strange $this scope, it should just E_ERROR or something.

  • I agree with Siderite. If you extends Father you are working with Fathers’ escenario. So you as Son shouldn’t be able to access an overriden method of the Grandfather.

  • Turn on strict notices under 5.3…

Advertisment ad adsense adlogger