Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76736 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52115 invoked from network); 20 Aug 2014 17:51:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Aug 2014 17:51:39 -0000 Authentication-Results: pb1.pair.com header.from=thegreatall@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=thegreatall@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.178 as permitted sender) X-PHP-List-Original-Sender: thegreatall@gmail.com X-Host-Fingerprint: 209.85.214.178 mail-ob0-f178.google.com Received: from [209.85.214.178] ([209.85.214.178:63847] helo=mail-ob0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D5/E4-29327-920E4F35 for ; Wed, 20 Aug 2014 13:51:37 -0400 Received: by mail-ob0-f178.google.com with SMTP id va2so4564681obc.37 for ; Wed, 20 Aug 2014 10:51:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Ew+gEiEdPRQ1vPkwG9jUhpsGT8ykQjHkoH45Qd0jskU=; b=B4Mccz1MquEVYrT415vcI2hlb19wRPIDdEGii06i9qyqbXMptsebY6NofzIJ36a2XB r6dNextQt7wj/XLDnNhpenm2+rZUSXlQlnJbFyFURnDrKdXlOGhnSxejTKTf1ST/CAil k+yzGjhIETpZ7rmUifO3eikkWVziR6aB/leff1VCfFxW4aeHPzgMPBV4Kluk4QNQkhio EK5+xWVJ641tFi1YZ1dUB3CPRx/+Kw2NL6TlUib38g/z0hBstpPLNqrHRX+X52FTjKRI AoK8/QqQSg/4K7ntoq1kcP5OcD3gbPJKmQXHKefijCU7Yu1PQ+0AmpRkVcak7TJnjEBW Iu8w== MIME-Version: 1.0 X-Received: by 10.182.20.242 with SMTP id q18mr51024176obe.52.1408557094299; Wed, 20 Aug 2014 10:51:34 -0700 (PDT) Sender: thegreatall@gmail.com Received: by 10.76.109.170 with HTTP; Wed, 20 Aug 2014 10:51:34 -0700 (PDT) In-Reply-To: References: Date: Wed, 20 Aug 2014 12:51:34 -0500 X-Google-Sender-Auth: 0LxfHSwb_g07xtpZOwY3u6UOVGE Message-ID: To: Andrea Faulds Cc: PHP Internals Content-Type: multipart/alternative; boundary=e89a8f83a883407bbe0501134127 Subject: Re: [PHP-DEV] [VOTE][RFC] Closure::apply() (re-opening) From: nathan.bruer@starin.biz (Nathan) --e89a8f83a883407bbe0501134127 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable The only thing I'd suggest is like I said in the last email is to make the syntax more like Closure::bind(Closure $closure, object $newThis, [mixed $newScope =3D 'static']) and make it Closure::apply(mixed $newObjectOrScope [, mixed ... $parameters]) $newObjectOrScope would then allow a user to supply a class name or an object. If class name is passed you have access to "static::", "self::", and "parent::" inside the function everything else works as described in the RFC. Give the ability to call a closure as a static method of a class or a normal method of an object. Right now the only way to do it is doing binding and creating new closures and calling those closures then destroying them. On Wed, Aug 20, 2014 at 7:50 AM, Andrea Faulds wrote: > Good afternoon, > > I=E2=80=99m putting this RFC to a vote again as I haven=E2=80=99t heard a= ny objections in > the past three days, and in the event something=E2=80=99s been missed, on= e week > would be long enough to spot it. > > Vote is here: https://wiki.php.net/rfc/closure_apply#vote > > It ends 2014-08-27. Thanks! > -- > Andrea Faulds > http://ajf.me/ > > > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --e89a8f83a883407bbe0501134127--