Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76358 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7057 invoked from network); 5 Aug 2014 15:53:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Aug 2014 15:53:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.48 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 209.85.216.48 mail-qa0-f48.google.com Received: from [209.85.216.48] ([209.85.216.48:41750] helo=mail-qa0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 38/35-48163-80EF0E35 for ; Tue, 05 Aug 2014 11:53:45 -0400 Received: by mail-qa0-f48.google.com with SMTP id m5so1112252qaj.21 for ; Tue, 05 Aug 2014 08:54:09 -0700 (PDT) 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=+X26zcYNPGiMIstA2O70ywB3i49lW2/yxRHU1D3gCYY=; b=rLn0J0az805j6cGWs4zTnqN38OmuVoe/nOWo6LDqUUVLe0nKLFHVigZLGdIxOWt6xN 2mObtwYB0oWORjmrZ0ny3ec2jNaYHjr6y2+CAecOycwF7QbwoxRxCIFHfuKFPm19++W0 qhfsvWBQ53PWBkiiT4lZtV8V2y3lzVU5N+64x7gfv/NDbn0kS4syiBhXzmQ36vy4GGvg 8xCpEA9TRQxdH2+Q4CiGekAmATrpG0Un/MZYMkMF2ahPw/sYTmkdzMRNSv7ntXRMGDdp a9nVkUxTk6uP+Wlt+dNm4MMbQq0wtnvM83KuVVCB86aGO+sPo4BvWKLTdKG6z8mGhJTy bNBw== X-Received: by 10.224.163.83 with SMTP id z19mr7217702qax.68.1407254049127; Tue, 05 Aug 2014 08:54:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.18.230 with HTTP; Tue, 5 Aug 2014 08:53:48 -0700 (PDT) In-Reply-To: References: <53E0F651.1020101@ralphschindler.com> Date: Tue, 5 Aug 2014 17:53:48 +0200 Message-ID: To: Andrea Faulds Cc: Ralph Schindler , PHP Internals List Content-Type: multipart/alternative; boundary=089e01294f66b5063704ffe3dd0b Subject: Re: [PHP-DEV] [RFC] Closure::call and Function Referencing as Closures From: ocramius@gmail.com (Marco Pivetta) --089e01294f66b5063704ffe3dd0b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 5 August 2014 17:50, Andrea Faulds wrote: > > On 5 Aug 2014, at 16:20, Ralph Schindler wrote= : > > > "->call()" would facilitate the following syntax, which I'd argue has > greater semantic meaning than the call_user_func() variant: > > > > $f->bar->call()->call(); > > At the risk of stating the obvious, can=E2=80=99t you just use $f->bar->_= _invoke() You can't do that if you can't assume that `bar` is a `Closure` instance. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ --089e01294f66b5063704ffe3dd0b--