Example #1
0
 public function __destruct()
 {
     //      parent::__destruct();
     echo "In D3 destructor\n";
     parent::__destruct();
 }
Example #2
0
 public function __construct($p1, $p2, $p3)
 {
     parent::__construct($p1, $p2);
     echo "In D3 constructor, {$p1}, {$p2}, {$p3}\n";
     //      parent::__construct($p1, $p2);      // not first statement in body, but OK
 }
Example #3
0
function main()
{
    $x = new D2();
    $y = 'ok';
    $x->foo($y);
}