Aer Interpreter Source
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
708 B

class Test1 {
public void __construct() {
print("Test1::__construct() called.\n");
}
public void __destruct() {
print("Test1::__destruct() called.\n");
}
}
class Test2 extends Test1 {
public void __construct() {
print("Test2::__construct() called.\n");
$base->__construct();
}
public void __destruct() {
print("Test2::__destruct() called.\n");
$base->__destruct();
}
}
class Program {
object $test;
public void __construct() {
print("Program::__construct() called.\n");
$this->test = new Test1();
}
public void __destruct() {
print("Program::__destruct() called.\n");
}
public void main() {
print("Program::main() called.\n");
object $test = new Test2();
}
}