<?php function __autoload($name) { var_dump($name); class TestA { public static $D; } } TestA::$D = 1;
<?php class TestA { protected static function doSomething() { echo "TestA::doSomething\n"; } protected static function test() { static::doSomething(); } public static function nativeTest($obj) { $obj->bar(); self::test(); } } class Foo { public function bar() { } } $obj = new Foo(); TestA::nativeTest($obj);
<?php include '../models.php'; $testA = new TestA(); $testA->methodA2(); $testA->variable1; functionA(); echo CONSTANT1;
TestB::test(); echo get_class(new static()) . "\n"; TestC::test(); echo get_class(new static()) . "\n"; TestBB::test(); echo get_class(new static()) . "\n"; } } class TestB { public static function test() { echo get_class(new static()) . "\n"; TestC::test(); echo get_class(new static()) . "\n"; } } class TestC { public static function test() { echo get_class(new static()) . "\n"; } } class TestBB extends TestB { } TestA::test(); ?> ==DONE==