RE: [PHP-DEV] On constructors: BC Break and Class compiler Improvements

From: Date: Fri, 02 Apr 2010 16:37:19 +0000
Subject: RE: [PHP-DEV] On constructors: BC Break and Class compiler Improvements
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-47744@lists.php.net to get a copy of this message
> -----Original Message----- > From: Stanislav Malyshev [mailto:stas@zend.com] > Sent: Thursday, April 01, 2010 12:34 PM > To: Pierre Joye > Cc: Ralph Schindler; internals > Subject: Re: [PHP-DEV] On constructors: BC Break and Class compiler > Improvements > > Hi! > > > Well, I think the question here is more about dropping old style > > constructor that case sensitive functions/methods name. I'm in favour > > of dropping in php-next. > > I don't feel comfortable with dropping class-named ctor altogether (big BC > issue) but dropping it in NS-classes seems to be easier (technically, it's NOT > the same name - the real class name is namespace\class) and would solve > 99% of the problem without having almost any BC impact. I agree. I would drop class-named ctors within namespaced classes and possibly in the next major version also do an E_STRICT for these in regular classes to try and get people to convert to __construct(). At a time where there's an increased focus on exposing dynamic services I think the class-named ctors is becoming increasingly problematic. Andi

« previous php.internals (#47744) next »