> -----Ursprüngliche Nachricht-----
> Von: Stanislav Malyshev [mailto:smalys...@gmail.com]
> Gesendet: Dienstag, 18. November 2014 10:21
> An: PHP Internals
> Betreff: [PHP-DEV] [RFC] Default constructors
> 
> Hi!
> 
> I'd like to propose the following RFC, which in short would allow any method 
> to call parent ctor (and some other methods)
> even if such is not explicitly defined:
> 
> https://wiki.php.net/rfc/default_ctor
> 
> The reasons are outlined in detail in the RFC and here:
> http://php100.wordpress.com/2014/11/04/default-constructors/
> 
> The patch is not finished yet but seems to be working fine, I'll add it to 
> the RFC this week as soon as I finish it. I'd like to put
> idea out there in the meantime and hear what everybody thinks about it.
> 
> Thanks,
> Stas
> 
> --
> PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: 
> http://www.php.net/unsub.php

+1
And concerning the subtle BC break, I think it is a bug that bar is currently 
not executed. In other cases where superfluous arguments are provided, they are 
evaluated. Hence, inconsistent anyway and should be fixed IMO.
Another example which outlines that the new behaviour is more appropriate:

class Foo{}
$b = 0;
//left over from refactoring, $b is currently not incremented even though it 
looks like that, new behaviour would fix that
$a = new Foo(++$b); 


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

Reply via email to