# [VOTE] Remove PHP 4 Constructors

- Thread: https://staging.externals.io/message/83541
- Original archive: https://news-web.php.net/php.internals/83541
- Started by Levi Morrison on 2015-02-23T04:39:34+00:00
- Messages: 5
- RFC: Remove PHP 4 Constructors (Implemented (PHP 7.0)) — https://staging.externals.io/rfc/remove_php4_constructors.md
- Reply by email to internals@lists.php.net
- More for agents: search with https://staging.externals.io/search.md?q={query} · RFCs at https://staging.externals.io/rfc.md · JSON API at https://staging.externals.io/api · documentation at https://staging.externals.io/llms.txt

---

## #83541 — Levi Morrison — 2015-02-23T04:39:34+00:00

URL: https://staging.externals.io/message/83541#83541

Dear Internals,

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.

Cheers,

Levi Morrison


  [1]: https://wiki.php.net/rfc/remove_php4_constructors

---

## #83544 — Yasuo Ohgaki — 2015-02-23T06:33:23+00:00

URL: https://staging.externals.io/message/83541#83544 · In reply to: #83541

Hi Levi,



> 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?

Regards,

P.S. I voted for "yes", of course.

--
Yasuo Ohgaki
yohgaki@ohgaki.net

---

## #83545 — Levi Morrison — 2015-02-23T06:40:45+00:00

URL: https://staging.externals.io/message/83541#83545 · In reply to: #83544

> Hi Levi,
>
> 
> > […]
>
>
> 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.

---

## #83546 — Yasuo Ohgaki — 2015-02-23T06:43:08+00:00

URL: https://staging.externals.io/message/83541#83546 · In reply to: #83545

Hi Levi,



> 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.
>

Thank you for the answer.
Everyone should vote "yes" for this RFC.

Regards,

--
Yasuo Ohgaki
yohgaki@ohgaki.net

---

## #84361 — Pascal Martin — 2015-03-05T22:10:57+00:00

URL: https://staging.externals.io/message/83541#84361 · In reply to: #83541

Le 23/02/2015 05:39, Levi Morrison a écrit :
> I have moved the RFC for removing PHP 4 constructors[1] into voting
> phase.

Hi,

After discussing this RFC with other people at AFUP, we would be on the 
+1 side, especially with the approach that goes in two steps, targeting 
both PHP 7 and PHP 8.

We would have been farther from a consensus with the "remove from PHP 7" 
idea -- but going in two steps, the first one being to mark those 
old-type constructors as deprecated, feels much better.

Thanks for you work!

-- 
Pascal MARTIN, AFUP - French UG
http://php-internals.afup.org/
