Hi!

> Right now, to avoid this situation, you have to do:
> if (method_exists(get_parent_class(), '__construct'))
> parent::__construct();
> 
> If you don't check for the method existing, you get:
> Fatal error: Cannot call constructor ...

This makes a lot of sense. I think we also discussed this idea some time
ago, but it didn't go anywhere that time... Right now I add empty ctor
in almost all base classes just because of this thing. I think having
implicit empty ctor would make a lot of things easier. Same would
probably do for dtor. How about creating an RFC about it? :)

-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

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

Reply via email to