Re: Re: rfc: pow-operator
| From: | Tjerk Meesters | Date: | Mon, 25 Nov 2013 07:22:11 +0000 |
| Subject: | Re: Re: rfc: pow-operator | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-70371@lists.php.net to get a copy of this message | ||
On Mon, Nov 25, 2013 at 3:16 PM, Galen Wright-Watson <ww.galen@gmail.com>wrote:
> On Sun, Nov 24, 2013 at 11:01 PM, Tjerk Meesters
> <tjerk.meesters@gmail.com>wrote:
>
> > On Mon, Nov 25, 2013 at 8:38 AM, Tjerk Meesters <
> tjerk.meesters@gmail.com
> > >wrote:
> >
> > > Hi Pierre,
> > >
> > >
> > > On Sun, Nov 24, 2013 at 11:56 PM, Pierre Joye <pierre.php@gmail.com
> > >wrote:
> > >> [...]
> > >> Should it not be possible to do something similar than isset? Changing
> > >> pow from a function to operator? The big advantage is that any
> > >> existing code will benefit from it without code changes.
> > >>
> > >
> > > Speeding up existing code sounds like a very good idea actually :) I'll
> > > look into this.
> > >
> >
> > Following up on this; I've turned pow() into a language construct now.
> > [...]
>
>
> Does that mean that 'pow', like 'empty' and 'isset', can't
> be passed as a
> callback?
>
That sure is a good reason not to remove it from
ext/standard/math.c :)
this currently works:
$ sapi/cli/php -r "echo call_user_func('pow', 2, 3);"
8
--
--
Tjerk