Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64206 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82655 invoked from network); 9 Dec 2012 08:30:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Dec 2012 08:30:34 -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 173.203.6.131 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 173.203.6.131 smtp131.ord.emailsrvr.com Linux 2.6 Received: from [173.203.6.131] ([173.203.6.131:46023] helo=smtp131.ord.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 05/B8-13109-82C44C05 for ; Sun, 09 Dec 2012 03:30:33 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp29.relay.ord1a.emailsrvr.com (SMTP Server) with ESMTP id E6719108093; Sun, 9 Dec 2012 03:30:29 -0500 (EST) X-Virus-Scanned: OK Received: by smtp29.relay.ord1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id E8F7B10808C; Sun, 9 Dec 2012 03:30:27 -0500 (EST) Message-ID: <50C44C23.3060302@sugarcrm.com> Date: Sun, 09 Dec 2012 00:30:27 -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: <50C3B9A1.7090403@sugarcrm.com> 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! > As it stands now, calling a method can mean two different things: > calling the method directly, or handling the method invocation within > __call(). Checking for a method first, a closure instance next, and then > falling through to __call() seems like it would have been a reasonable > approach. This is the same thing. However, what you mean by "closure instance" is actually a property access, which is not the same thing as method call. Think about what happens if you have both __call and __get (or object implementing both handlers). -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227