1.2.1156. Static Methods Cannot Call Non-Static Methods

A static method cannot call a non-static method. The object context would be missing.

On the other hand, a method may call a static method, as the context is lost, but not useful.

Magic methods cannot be static, so they are out of this rule. This applies to the constructor, when called with parent\:\:`__construct() <https://www.php.net/manual/en/language.oop5.decon.php>`_.

<?php

class x {
     function foo() {}

     static function ioo() {
             // This syntax is valid within a class
             // yet, the call is not possible
             self::foo();
     }

}
?>