Hi! > In summary: should abstract protected constructors be inaccessible by > siblings, as is true of __clone and __destruct? Should __construct, __clone > and __destruct always be accessible in relatives, as is true of other > methods? Depending on the answers, there could be a documentation issue, or > bugs.
OK, I checked why ctor behaves differently, and it's because parent ctor is considered to be prototype for child ctor (with signature enforcement, etc.) only if it's declared abstract or brought from the interface. So, by declaring ctor as abstract or making it part of the interface, you make it part of the contract and thus accessible to all hierarchy. If you do not do that, ctors are completely unrelated to each other (this is different for all other non-static methods) and thus having parent ctor doesn't say anything about child ctor, so parent ctor's visibility does not carry over. So for ctor is not a bug. I still think it's most probably a bug for __clone and __destruct. -- 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