Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88550 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91619 invoked from network); 29 Sep 2015 14:56:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Sep 2015 14:56:39 -0000 Authentication-Results: pb1.pair.com header.from=ppetermann80@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ppetermann80@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.174 as permitted sender) X-PHP-List-Original-Sender: ppetermann80@gmail.com X-Host-Fingerprint: 209.85.212.174 mail-wi0-f174.google.com Received: from [209.85.212.174] ([209.85.212.174:37069] helo=mail-wi0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AC/51-20099-4A6AA065 for ; Tue, 29 Sep 2015 10:56:36 -0400 Received: by wicfx3 with SMTP id fx3so20117203wic.0 for ; Tue, 29 Sep 2015 07:56:33 -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 :content-type; bh=coiSnbfNiYqHzLLrxACNsl2VYG5u8Vjs55x+u4KrjUs=; b=Ld/Q48GzjxcjZsTQeAGyDepQbARN3ZDCVVD60GCge8t7tcebZNnd0wna+9fn6cLzHh N5W7kae9OKKMMLCAjbYEg4p66ApMBjoSa+cY3Ukg1RViHOOIzERSVGfOdSeTv4sQ2oI0 e3GTeMMcEJBkZ0wtFah8rwv/fYUDayUso0RkW7MrinJzY1v/Hh/tTpQo5Zy3wsPpbi4L 3u5UKZMC+IoniphVD/0qdIWUNYUE5sVYejF2dBafhPp9mwQH9M3luLLanCsb02lyQyvG naVKhMGnpEJzFyH0goPNw544XkkS5ji7MjQbAZuZlAYQD41KcXwOv2hqRpyjMJEYUjfz q92Q== MIME-Version: 1.0 X-Received: by 10.180.102.169 with SMTP id fp9mr27150390wib.29.1443538591101; Tue, 29 Sep 2015 07:56:31 -0700 (PDT) Received: by 10.194.82.70 with HTTP; Tue, 29 Sep 2015 07:56:31 -0700 (PDT) In-Reply-To: References: Date: Tue, 29 Sep 2015 16:56:31 +0200 Message-ID: To: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=f46d04447e2bf1397d0520e4043c Subject: Fwd: [PHP-DEV] [RFC] [DISCUSSION]: Closure from callable From: ppetermann80@gmail.com (Peter Petermann) --f46d04447e2bf1397d0520e4043c Content-Type: text/plain; charset=UTF-8 Hi Dan, I'm not sure if i follow, -> why not just do "return function() { $this->myPrivateMethod(); };" If you really really need a closure to be returned that calls a private method? because this should return a closure thats bound to the actual object? -> this should be easy enough to do userland, including checking if the method exists -> it might not be the best idea to use closures to call privates anyways (think about the readability/maintainability of the code) regards, PP 2015-09-29 16:23 GMT+02:00 Dan Ackroyd : > Hello internals, > > I'd like to start a discussion of a proposal to allow closures to be > created in user-land without having to use a whole lot of reflection > code. > > https://wiki.php.net/rfc/closurefromcallable > > Thanks to Joe and Bob for the assistance in the patch. > > cheers > Dan > Ack > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Peter Petermann ProtonMail: ppetermann@protonmail.com (encrypted / based in .ch) Email: ppetermann80@gmail.com - get my public PGP key from SKS Keyservers PGP Key: http://pool.sks-keyservers.net:11371/pks/lookup?op=get&search=0x0E6DBD675836A5C7 --f46d04447e2bf1397d0520e4043c--