Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78960 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33941 invoked from network); 18 Nov 2014 21:51:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Nov 2014 21:51:36 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.46 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.46 mail-wg0-f46.google.com Received: from [74.125.82.46] ([74.125.82.46:40231] helo=mail-wg0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 93/C4-06737-56FBB645 for ; Tue, 18 Nov 2014 16:51:33 -0500 Received: by mail-wg0-f46.google.com with SMTP id x12so1069710wgg.19 for ; Tue, 18 Nov 2014 13:51:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=xzKIqjLxKGFY09srDmCAp6VH8A6oEvLj1ZWlEGgRJRo=; b=iVt6b4W1YDwkCMDs65muKrPDMUxStzaL43QttfXGLFd79c0TEiQejRV7avwMr2rO/t CyB/6iFUzlc6NT1BhjzsTVhzbETKWliNcj6S2LZtNGSBBw4Ssor428GGZB9Fzx4oOuIy mp///taTZhCq0RrIOpCyT6w88iwWplyVwdJm/lkQk4sGem/0SBW5Xm89CxKpgKmQeNxA n+upiR006QYSL1oXEGVQ5lat1Eyb0/7dd2j8FxkWesElPPvdtN/UsELuKodhpnFGkWN8 5bJs9KXwRdD6wnYxN5BaXpORiqP+RH6NgcabOJJp+AVPvfNMDhLzkC+4dHuvBDDluOC0 8X8w== X-Received: by 10.194.187.77 with SMTP id fq13mr52477728wjc.14.1416347490189; Tue, 18 Nov 2014 13:51:30 -0800 (PST) Received: from [192.168.0.2] (cpc68956-brig15-2-0-cust215.3-3.cable.virginm.net. [82.6.24.216]) by mx.google.com with ESMTPSA id r10sm496035wiy.19.2014.11.18.13.51.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Nov 2014 13:51:29 -0800 (PST) Message-ID: <546BBF4F.8040806@gmail.com> Date: Tue, 18 Nov 2014 21:51:11 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: internals@lists.php.net References: <546B0F62.1090705@gmail.com> <546B95F2.2050504@gmail.com> In-Reply-To: <546B95F2.2050504@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Default constructors From: rowan.collins@gmail.com (Rowan Collins) On 18/11/2014 18:54, Stanislav Malyshev wrote: > Hi! > >> You write: >> >>> Also, this can lead to more subtle BC breaks. Consider this code: >> And then further on: >> >>> No backward incompatible changes, sin... >> that can not be both right. > Ah, but the former describes the option that has been *rejected*. The > option that was chosen instead does not have the BC break. > 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: class Foo {} new Foo( print('hello') ); // silent vs class Foo { function __construct() {} } new Foo( print('hello') ); // says "hello" (Incidentally, HHVM doesn't have this "optimisation", and says "hello" in both cases: http://3v4l.org/ZDXs1) 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. Regards, -- Rowan Collins [IMSoP]