Re: [VOTE] Remove PHP 4 Constructors

From: Date: Mon, 23 Feb 2015 06:40:45 +0000
Subject: Re: [VOTE] Remove PHP 4 Constructors
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-83545@lists.php.net to get a copy of this message
On Sun, Feb 22, 2015 at 11:33 PM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote: > Hi Levi, > > On Mon, Feb 23, 2015 at 1:39 PM, Levi Morrison <levim@php.net> wrote: >> >> I have moved the RFC for removing PHP 4 constructors[1] into voting >> phase. As there are a lot of RFCs in discussion and voting right now I >> will leave this RFC in voting phase until the evening (UTC-7) of March >> 6th which is 12 days away; this will hopefully allow everyone to be >> able to review this RFC and vote on it without being rushed. > > > This may be a bit off topic. During this RFC discussion, I mentioned Trait > method > name issue that trait method which has PHP4 constructor name for the class > is > treated as class constructor. > > http://3v4l.org/gHbdq (Trait method is called as constructor) > > If there is __construct() in the class > > http://3v4l.org/HEBMl (Fatal error: A has colliding constructor > definitions > coming from traits) > > Is this bug fixed also? Or we have to wait until PHP8? Aside from the new warning that is emitted and the old one that is removed no other behavior is changed. This means the "bug" will remain through the PHP 7 lifecycle even if this RFC passes. If the RFC passes the colliding constructor issue will be removed in PHP 8 when the rest of the old-style constructor support is removed.

« previous php.internals (#83545) next »