Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64200 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52015 invoked from network); 8 Dec 2012 22:05:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Dec 2012 22:05:30 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.163 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.163 smtp163.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.163] ([67.192.241.163:44569] helo=smtp163.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2A/75-13109-8A9B3C05 for ; Sat, 08 Dec 2012 17:05:30 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp16.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 722A94025F; Sat, 8 Dec 2012 17:05:26 -0500 (EST) X-Virus-Scanned: OK Received: by smtp16.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id DC61F4024A; Sat, 8 Dec 2012 17:05:24 -0500 (EST) Message-ID: <50C3B9A1.7090403@sugarcrm.com> Date: Sat, 08 Dec 2012 14:05:21 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: Adam Jon Richardson CC: "internals@lists.php.net" References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Call closure stored as object property directly without use of temporary variable From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > Has anyone else wanted this functionality? Has anyone else thought of ideas > of addressing this (or come to the conclusion it really isn't safely > addressable without causing disproportionate amounts of grief?) Yes, there were people that wanted this functionality, but since having the same thing ($foo->bar()) mean two different things (call method named "foo" vs. "fetch property named foo and then call it if it's callable") is not a good idea this wasn't done. In some languages, the options above are the same - i.e. methods and properties are actually the same thing - but in PHP is is not so, and can be made so without some BC-breaking changes. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227