Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19531 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15357 invoked by uid 1010); 9 Oct 2005 12:04:34 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 15342 invoked from network); 9 Oct 2005 12:04:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Oct 2005 12:04:34 -0000 X-Host-Fingerprint: 195.227.108.51 wfserver02.wf-ppr.de Windows 2000 SP2+, XP SP1 (seldom 98 4.10.2222) Received: from ([195.227.108.51:29980] helo=wfserver02.wf-ppr.de) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 45/A0-54476-25709434 for ; Sun, 09 Oct 2005 08:04:34 -0400 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 Date: Sun, 9 Oct 2005 14:04:28 +0200 Message-ID: <00A2E2156BEE8446A81C8881AE117F192C15D6@companyweb> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PHP-DEV] return /* by reference */ new Foo() in PHP4 Thread-Index: AcXMxzIQ5ahVYk6bSi6RpL3jTUkSngAAGARQ To: Subject: AW: [PHP-DEV] return /* by reference */ new Foo() in PHP4 From: mp@webfactory.de ("Matthias Pigulla") Sorry, Olli, if that kind of ignores your statements, but I would like not to distract from the issue. IIRC, what you suggested is called "boxing" in C# and would lead too far here. I wanted to focus only on the "return new ..." case and only on PHP4, as "return new" is a very special case. This particular construct is really unambiguous and the workaround on the PHP language level is really nonsense. As to the notices, I will gladly accept them and take them as a helpful pointers when "fixing" my "broken" code. The problem is that this particular case causes a lot of "white noise" notices (at least in heavily OO apps), as IMHO "return new" is not something that needs to be fixed by me. I have been strolling around in a lot of places where the changed behaviour is being discussed, but I haven't seen a sound rationale for *this particular* case yet. Kind regards, Matthias