Source code raw phps
<?php
class A {
public $test = 1;
public function __construct() {
static::who();
}
static function test() {
$a = new A();
// everything related to new A() should have been popped at this stage
static::who();
}
static function who() {
echo "A";
}
}
class B extends A {
static function who() {
echo "B";
}
}
echo B::test(); // A B
Comments
There is currently no comment here.