[snip]
> FYI ... anything below PHP5 has a pseudo constructor.

And how will it be in PHP5 ?
[/snip]

PHP5 will be using the Zend 2 Engine, and gives a standard way of
declaring constructor methods by calling them by the name __construct().


An example from http://www.php.net/zend-engine-2.php

<?php
class BaseClass {
    function __construct() {
        print "In BaseClass constructor\n";
    }
}

class SubClass extends BaseClass {
    function __construct() {
        parent::__construct();
        print "In SubClass constructor\n";
    }
}

$obj = new BaseClass();
$obj = new SubClass();
?> 

True destructors will also be available, as should be true private
methods.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to