While http://www.php.net/zend-engine-2.php claims the following

        'Like constructors, parent destructors will not be called
        implicitly by the engine. In order to run a parent destructor,
        one would have to explicitly call parent::__destruct() in the
        destructor body.

the following code

        php -r 'abstract class A { protected function __destruct() {} }
                class B extends A {}
                $b = new B;'

results in

        Warning: Call to protected B::__destruct() from context ''
        during shutdown ignored in Unknown on line 0

which is inconsistent with the quoted description.
It also introduces an asymmetry compared to constructors which I think is confusing.


Any thoughts ?

--
Ard

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to