Re: Implementing Generics, and none scalar default properties.
| From: | Stanislav Malyshev | Date: | Fri, 25 Sep 2015 21:53:01 +0000 |
| Subject: | Re: Implementing Generics, and none scalar default properties. | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-88503@lists.php.net to get a copy of this message | ||
Hi!
> I'm thinking primarily of the benefit to base or abstract classes. For
Both can have constructors.
> base classes which expect certain properties be set, they are exposed to
> the danger of remaining unset if the derived class overrides the
> constructor without calling the parent.
You should always call the parent ctor. There's pretty much no reason to
ever not to call parent ctor.
--
Stas Malyshev
smalyshev@gmail.com