About the constructors :
Yes, a good pratrice could be to use a method called by the real constructor. In PHP 5, constructor are unified with the special __construct method. So we could do :
<?php
class A {
var $a = "null";
function A() {
$args = func_get_args();
call_user_func_array(array(&$this, "__construct"), $args);
}
function __construct($a) {
$this->a = $a;
echo "A <br/>";
}
}
class B extends A {
var $b = "null";
function __construct($a, $b) {
$this->b = $b;
echo "B <br/>";
parent::__construct($a);
}
function display() {
echo $this->a, " / ", $this->b, "<br/>";
}
}
$b = new B("haha", "bobo");
$b->display();
?>
It will have the same behavior than standard php constructors, except that you can not pass arguments by reference.