<?php class TestClass { protected static $counter = 0; public static function __callStatic($name, $args) { return (new self())->test(); } public function publicWrapperOverTest() { return $this->test(); } protected function test() { return ++self::$counter; } } print (new TestClass)->publicWrapperOverTest(); print TestClass::test();
You have javascript disabled. You will not be able to edit any code.