Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64204 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60678 invoked from network); 8 Dec 2012 23:27:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Dec 2012 23:27:34 -0000 Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.175 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 209.85.223.175 mail-ie0-f175.google.com Received: from [209.85.223.175] ([209.85.223.175:59965] helo=mail-ie0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2D/F6-13109-5ECC3C05 for ; Sat, 08 Dec 2012 18:27:33 -0500 Received: by mail-ie0-f175.google.com with SMTP id qd14so4881132ieb.34 for ; Sat, 08 Dec 2012 15:27:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=d4ibGUA5T0fKbrn+qiHZ09VodAF+33IVazLRnDsUDqc=; b=hGocwAw+fhh53E0W4gfoSHvterzR7D71EsDwT7oaOo4cYvOquRJ7uihP9rDHCiHaMl qYdbLOF51raVbUol2pPxOMzSeFqI/W1bIlaGezx4RiS8beU/DvBTb4F6sHO7fmQ2CWYP Wvi6XXBR2VGdWe0LPqyHn6PtvEHuTN5j1k6reXcs8eD7K9oUjQgTCU/loDbOcfwhT9Kx OC2QjfANN1krSqsZKrLi0yS8bC2o4DnDGkJZgRJXrYhj7mdaqXD2lZ//K/wmKo+ahLpv G/8lLvMV+f2DJgoCABkNVAHbNkluDUc9JEcJmMAJk0a/4Fp78dzt2YU1QJjft+YxvP71 sTAA== Received: by 10.50.150.144 with SMTP id ui16mr2803522igb.68.1355009250724; Sat, 08 Dec 2012 15:27:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.136.81 with HTTP; Sat, 8 Dec 2012 15:27:10 -0800 (PST) In-Reply-To: References: <50C3C0D4.1040600@mrclay.org> Date: Sun, 9 Dec 2012 00:27:10 +0100 Message-ID: To: Adam Jon Richardson Cc: Steve Clay , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=f46d04339d440e8ae404d05fad79 Subject: Re: [PHP-DEV] Call closure stored as object property directly without use of temporary variable From: ocramius@gmail.com (Marco Pivetta) --f46d04339d440e8ae404d05fad79 Content-Type: text/plain; charset=UTF-8 I'm currently working around this problem by assuming that a Closure implements `__invoke`: `$this->someProp->__invoke();` Not really nice, but this works in both 5.3 and 5.4. If the suggestion above could cover also `callable` and not just `Closure` then it would be quite interesting to have that. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ --f46d04339d440e8ae404d05fad79--