Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76361 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16217 invoked from network); 5 Aug 2014 16:40:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Aug 2014 16:40:17 -0000 Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.200 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.200 imap1-2.ox.privateemail.com Received: from [192.64.116.200] ([192.64.116.200:34923] helo=imap1-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AC/76-48163-DE801E35 for ; Tue, 05 Aug 2014 12:40:15 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 9569AB0008E; Tue, 5 Aug 2014 12:40:39 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap1.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap1.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id QuzjHqgFD-Es; Tue, 5 Aug 2014 12:40:39 -0400 (EDT) Received: from [192.168.0.2] (05439dda.skybroadband.com [5.67.157.218]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id B5D1FB00085; Tue, 5 Aug 2014 12:40:37 -0400 (EDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) In-Reply-To: Date: Tue, 5 Aug 2014 17:40:34 +0100 Cc: Ralph Schindler , PHP Internals List Content-Transfer-Encoding: quoted-printable Message-ID: References: <53E0F651.1020101@ralphschindler.com> <53E0FFF2.3050803@ralphschindler.com> To: Marco Pivetta X-Mailer: Apple Mail (2.1878.6) Subject: Re: [PHP-DEV] [RFC] Closure::call and Function Referencing as Closures From: ajf@ajf.me (Andrea Faulds) On 5 Aug 2014, at 17:08, Marco Pivetta wrote: >=20 > On 5 August 2014 18:01, Ralph Schindler = wrote: > At the risk of stating the obvious, can=92t you just use = $f->bar->__invoke()? >=20 > >Actually, it was not immediately obvious that __invoke() was a method = from the docs as it is a side-note and not in the class signature = breakout. Oops! ;) >=20 > >http://php.net/manual/en/class.closure.php >=20 > Interestingly, reflection doesn't even expose it: = http://3v4l.org/8Jutn Side note, but that=92s because __invoke on Closure doesn=92t actually = exist. It=92s a method that is created by trying to access it and ceases = to exist once called. Freaky, right? -- Andrea Faulds http://ajf.me/