On Tue, Nov 18, 2014 at 3:26 PM, Julien Breux <julien.br...@gmail.com>
wrote:

> I think that it is great time to end to PHP 4 constructors system for PHP
> 7.
>
> IMO, It's a good RFC.
>

Agreed.  I was going to suggest we throw E_DEPRECATED for 5.x, but you
already have that covered in the RFC.  I don't see anything wrong with this
proposal, in fact.  In hindsight, it probably would've been better if we
had started raising E_DEPRECATED for it back in 5.0, but better now than
never.  We certainly have no obligation to support BC on features that
became obsolete with PHP 4.

+1 on this.

--Kris


>
> On Wed, Nov 19, 2014 at 12:11 AM, Levi Morrison <le...@php.net> wrote:
>
> > Dear Internals,
> >
> > I am proposing an RFC[1] to remove PHP 4 constructors in PHP 7. If
> > accepted, methods with the same name as their defining class will no
> > longer be recognized as constructors. As noted in the RFC, there are
> > already many situations where we do not recognize these methods as
> > constructors, such as in namespaces and traits and when `function
> > __construct` is also present.
> >
> > Andrea Faulds has kindly written a utility that identifies when a PHP
> > 4 constructor is defined[2]. It does not automatically change the code
> > for liability reasons. The utility PHPMD[3] can also detect this but
> > has a false positive when `__construct` is also defined.
> >
> > Cheers,
> > Levi Morrison
> >
> >
> >   [1]: https://wiki.php.net/rfc/remove_php4_constructors
> >   [2]: https://github.com/TazeTSchnitzel/PHP4_Constructor_Finder
> >   [3]:
> > http://phpmd.org/rules/naming.html#constructorwithnameasenclosingclass
> >
> > --
> > PHP Internals - PHP Runtime Development Mailing List
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>

Reply via email to