Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76362 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31211 invoked from network); 5 Aug 2014 17:40:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Aug 2014 17:40:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.48 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.192.48 mail-qg0-f48.google.com Received: from [209.85.192.48] ([209.85.192.48:37390] helo=mail-qg0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EA/20-29537-0F611E35 for ; Tue, 05 Aug 2014 13:40:00 -0400 Received: by mail-qg0-f48.google.com with SMTP id i50so1361142qgf.21 for ; Tue, 05 Aug 2014 10:40:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=u2CYXdFZj79UnUECL53ShWWe8IhP0DEnNwuy8/Fvi7g=; b=ZCQEgFg6e4jYQxNAxaCn1OWpTSCVUH6w1JhpaRLMMXt+/QuIrK6yY6AkhGDOqcSnBj SehezVeYw4Fd7Do8pa/092jG+7G4MVNrVVs908ktnJST95PQs8JMB4Z48l0dBcJeZb5x 7JAbm56mNXuafUvmKilA8GY3rdpPDSLfOSBcu5InUznw727yuB0NTgOclWqnQFTJIttu xa92ZxWPfV6kS2f8gq9fY5asQ52eB7ia/r0inFOt8T5zUbXx1XjU8xByW+jeBiBVKr3/ V7XyskgrhzdE4Y+1W9Dr5oKbHnR+VLVoXbrM0ajVuefvkEV8Ei6iMSzcE2GFX+dbcdqL dZ/A== MIME-Version: 1.0 X-Received: by 10.224.47.130 with SMTP id n2mr8009224qaf.87.1407260425495; Tue, 05 Aug 2014 10:40:25 -0700 (PDT) Received: by 10.140.24.54 with HTTP; Tue, 5 Aug 2014 10:40:25 -0700 (PDT) Received: by 10.140.24.54 with HTTP; Tue, 5 Aug 2014 10:40:25 -0700 (PDT) In-Reply-To: References: <53E0F651.1020101@ralphschindler.com> <53E0FFF2.3050803@ralphschindler.com> Date: Tue, 5 Aug 2014 19:40:25 +0200 Message-ID: To: Andrea Faulds Cc: Ralph Schindler , Marco Pivetta , PHP Internals List Content-Type: multipart/alternative; boundary=001a1134b004c4ad3604ffe55920 Subject: Re: [PHP-DEV] [RFC] Closure::call and Function Referencing as Closures From: pierre.php@gmail.com (Pierre Joye) --001a1134b004c4ad3604ffe55920 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Andrea, On Aug 5, 2014 6:40 PM, "Andrea Faulds" wrote: > > > On 5 Aug 2014, at 17:08, Marco Pivetta wrote: > > > > > On 5 August 2014 18:01, Ralph Schindler wrote: > > At the risk of stating the obvious, can=E2=80=99t you just use $f->bar->__invoke()? > > > > >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! ;) > > > > >http://php.net/manual/en/class.closure.php > > > > Interestingly, reflection doesn't even expose it: http://3v4l.org/8Jutn > > Side note, but that=E2=80=99s because __invoke on Closure doesn=E2=80=99t= actually exist. It=E2=80=99s a method that is created by trying to access it and ceases to = exist once called. Freaky, right? Do you have an example where this feature could be very helpful? This exact feature? Cheers, Pierre --001a1134b004c4ad3604ffe55920--