Hi! > mean we should add this, though. Because this RFC means you can just > blindly call the constructor, whether or not it exists, and expect it
Yes, that's exactly what it means and it's good, not bad - new() has been doing that for years and nobody complained. > to work. And that is bad: If you don’t know how the parent class > works, you really shouldn’t be extending it. -- Andrea Faulds That sounds just wrong - information hiding is a basic premise of OO, and to extend the object you shouldn't have to know the intimate details of its implementation. In fact, in many cases you can't - such as with internal classes. That's why we have problems with class initilization for extending internal classes - because people are trained "you can't just call the parent ctor, you need to verify things thoroughly first". And that'd exactly wrong. If you know you can create an object without parameters - new Foo() - then you should be able to extend it and call parent::__construct() - which is supposed to do exactly the same. Unfortunately, in PHP - unlike pretty much any other OO language - you can not. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php