The self keyword does not follow the same rules of inheritance. self always resolves to the class in which it is used. This means that if you make a method in a parent class and call it from a child class, self will not reference the child as you might expect.
<?php class Php{ public static function framework(){ echo static::getClass()."<br/>"; } public static function getClass(){ return __CLASS__; } } class ChildPhp extends Php{ public static function getClass(){ return __CLASS__; } } $php = new php; $php->framework(); $childphp = new ChildPhp; $childphp->framework();