Then maybe it has to do what bradgrafelman asked.
What php version you run?
If you run
phpinfo();
what PHP Version, you have?
If you have an older version (I have 5.3.0 and most people have 5.2.x)
then you may not have support for abstract
So, you have to run it without abstract, like this
<?php
class Node {
public function __construct() {
print(__class__." was constructed.");
}
public function __destruct() {
print(__class__." was destructor.");
}
}
class Trunk extends Node {
public function __construct() {
parent::__construct();
print(__class__." was constructed.");
}
public function __destruct() {
print(__class__." was destructed.");
parent::__destruct();
}
}
$elephant = new Trunk();
?>