On 18/11/2014 20:20, Alexander Kurilo wrote:
Does it *really* make sense for PHP? What if that parent class 'Animal' from your example introduces a constructor that accepts, say, both `$owner` and `$what` as mandatory arguments? `parent::__construct()` call in a descendant will appear broken (unintentionally, I suppose), won't it?

If you introduce a mandatory parameter to *any* function, method, or constructor, existing calls to that function, method, or constructor will be broken.

A class with no defined constructor already behaves as if its constructor had no arguments when using "new", so introducing a constructor with mandatory arguments is already a breaking change.

--
Rowan Collins
[IMSoP]


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

Reply via email to