Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46839 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16032 invoked from network); 20 Jan 2010 15:45:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jan 2010 15:45:39 -0000 Authentication-Results: pb1.pair.com header.from=ceo@l-i-e.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ceo@l-i-e.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain l-i-e.com designates 67.139.134.202 as permitted sender) X-PHP-List-Original-Sender: ceo@l-i-e.com X-Host-Fingerprint: 67.139.134.202 o2.hostbaby.com FreeBSD 4.7-5.2 (or MacOS X 10.2-10.3) (2) Received: from [67.139.134.202] ([67.139.134.202:1724] helo=o2.hostbaby.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 66/BB-59157-E15275B4 for ; Wed, 20 Jan 2010 10:45:36 -0500 Received: (qmail 8582 invoked by uid 98); 20 Jan 2010 15:45:30 -0000 Received: from localhost by o2.hostbaby.com (envelope-from , uid 1013) with qmail-scanner-2.05 (clamdscan: 0.88.7/10316. Clear:RC:1(127.0.0.1):. Processed in 0.108624 secs); 20 Jan 2010 15:45:30 -0000 Received: from localhost (HELO www.l-i-e.com) (127.0.0.1) by localhost with SMTP; 20 Jan 2010 15:45:30 -0000 Received: from webmail (SquirrelMail authenticated user ceo@l-i-e.com) by www.l-i-e.com with HTTP; Wed, 20 Jan 2010 09:45:30 -0600 (CST) Message-ID: <48038.74.222.1264002330.squirrel@www.l-i-e.com> In-Reply-To: <68de37341001190820p486b7c31o5689ab5554b8d260@mail.gmail.com> References: <4B54FC87.8070106@zend.com> <4F.56.22457.408955B4@pb1.pair.com> <4B55D850.8000604@zend.com> <68de37341001190820p486b7c31o5689ab5554b8d260@mail.gmail.com> Date: Wed, 20 Jan 2010 09:45:30 -0600 (CST) To: "Eddie Drapkin" Cc: "Stanislav Malyshev" , "Michael Wallner" , internals@lists.php.net User-Agent: Hostbaby Webmail MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: [PHP-DEV] Re: function call chaining From: ceo@l-i-e.com ("Richard Lynch") On Tue, January 19, 2010 10:20 am, Eddie Drapkin wrote: > On Tue, Jan 19, 2010 at 11:05 AM, Stanislav Malyshev > wrote: >> The second was next on my list, while the first seems to me kind of >> exotic - >> why create object only to call one method and immediately drop it? >> Why this >> method is not static then? > > > Why would this imply "dropping" the object? > > This: > $foo = (new bar())->someSetter(); > Looks a lot better than this > $foo = new bar(); > $foo->someSetter(); I would expect the first to put the result of someSetter() into $foo, not the actual bar object... For that, I'd expect to see: ($foo = new bar())->someSetter(); -- Some people ask for gifts here. I just want you to buy an Indie CD for yourself: http://cdbaby.com/search/from/lynch