Why are you using statics, is this not a very good OOP? Statics are not suitable for use in inheritance, since they are designed to provide functionality specifically for this class. It does what you need.
<?php Interface IDoesSomething{ public function returnSomething(); } abstract class MiddleManClass implements IDoesSomething{ public function doSomething(){ return 1337 * $this->returnSomething(); } } class SomeClass extends MiddleManClass{ public function returnSomething(){ return 999; } } $someClass = new SomeClass(); $foo = $someClass->doSomething();
source share