Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78961 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35421 invoked from network); 18 Nov 2014 21:53:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Nov 2014 21:53:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.208 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.208 imap2-3.ox.privateemail.com Received: from [192.64.116.208] ([192.64.116.208:44276] helo=imap2-3.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E8/15-06737-6EFBB645 for ; Tue, 18 Nov 2014 16:53:44 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 00D408C0084; Tue, 18 Nov 2014 16:53:40 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at imap2.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap2.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id WRIyvkDMjQOE; Tue, 18 Nov 2014 16:53:39 -0500 (EST) Received: from oa-res-27-29.wireless.abdn.ac.uk (oa-res-27-29.wireless.abdn.ac.uk [137.50.27.29]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id 4716D8C0082; Tue, 18 Nov 2014 16:53:39 -0500 (EST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) In-Reply-To: <546BBF4F.8040806@gmail.com> Date: Tue, 18 Nov 2014 21:53:37 +0000 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <919EDD0D-F0F4-430A-A84B-96A32DF45E7B@ajf.me> References: <546B0F62.1090705@gmail.com> <546B95F2.2050504@gmail.com> <546BBF4F.8040806@gmail.com> To: Rowan Collins X-Mailer: Apple Mail (2.1993) Subject: Re: [PHP-DEV] [RFC] Default constructors From: ajf@ajf.me (Andrea Faulds) > On 18 Nov 2014, at 21:51, Rowan Collins = wrote: >=20 > Personally, I would much prefer the backwards compatibility break to = happen. It is frankly quite bizarre, and not at all useful, that the = following two pieces of code behave differently: >=20 > class Foo {} > new Foo( print('hello') ); > // silent >=20 > vs >=20 > class Foo { function __construct() {} } > new Foo( print('hello') ); > // says "hello" >=20 > (Incidentally, HHVM doesn't have this "optimisation", and says "hello" = in both cases: http://3v4l.org/ZDXs1) >=20 > If I came upon this without knowing more, I would assume it was a bug = in PHP, and any code relying on it was in need of fixing ASAP. In fact, it *is* a bug: https://bugs.php.net/bug.php?id=3D67829 -- Andrea Faulds http://ajf.me/