Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80635 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91558 invoked from network); 16 Jan 2015 11:28:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jan 2015 11:28:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:47813] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 96/D1-15918-ED5F8B45 for ; Fri, 16 Jan 2015 06:28:33 -0500 Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id CB5E6E202D; Fri, 16 Jan 2015 11:28:26 +0000 (GMT) Date: Fri, 16 Jan 2015 11:28:26 +0000 (GMT) X-X-Sender: derick@whisky.home.derickrethans.nl To: Levi Morrison cc: Andrea Faulds , internals In-Reply-To: Message-ID: References: <0DD30A0D-E7CA-4150-83E0-8FD46635279C@ajf.me> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323329-1494528955-1421407707=:4080" Subject: Re: [PHP-DEV] [RFC] Remove PHP 4 Constructors From: derick@php.net (Derick Rethans) --8323329-1494528955-1421407707=:4080 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 15 Jan 2015, Levi Morrison wrote: > On Thu, Jan 15, 2015 at 9:55 AM, Andrea Faulds wrote: > > > > Upon further thought, I=E2=80=99m not super-enthusiastic about this. As= has=20 > > been pointed out, it=E2=80=99s a pretty serious BC break, whether code = can=20 > > be automatically updated or not. PHP 4 constructors may be obsolete,=20 > > but an awful lot of code uses them. > > > > A better solution, IMO, might be simply to add a deprecation notice.=20 > > This would make it obvious during development if you=E2=80=99ve acciden= tally=20 > > defined a PHP4 constructor, and would encourage migration away from=20 > > them, but wouldn=E2=80=99t prevent existing code from working. >=20 > Possibly. The reality of my position is that I am unhappy about our > current constructor situation. Having `__construct` and only > half-heartedly supporting old-style constructors for the next several > years (maybe ten?) does not sound good at all. >=20 > Removing one of the constructors is a nicer end product than fully > supporting both, in my opinion, which is why I proposed dropping it.=20 Instead of just dropping it, which would likely generate odd bugs,=20 declaring an old style constructor should *tell* you it's no longer=20 working- perhaps with as strong of an error as an=20 E_COMPILE_ERROR=E2=80=94atleast for PHP 7. Just removing it support would, = IMO,=20 be silly. cheers, Derick --8323329-1494528955-1421407707=:4080--