Re: [RFC] Importing namespaced functions
| From: | Igor Wiedler | Date: | Wed, 24 Jul 2013 11:03:09 +0000 |
| Subject: | Re: [RFC] Importing namespaced functions | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-68298@lists.php.net to get a copy of this message | ||
Hi Yasuo,
Monkey patching could be a very useful feature, especially for functions in a testing context.
But I agree with Stas that it's not really related to importing function/class symbols. Perhaps
you should create a separate RFC for it.
On Jul 24, 2013, at 7:28 AM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote:
> RunKit is nice, but it's not a standard module and I suppose it will
> not be standard.
>
> This might be a poor example of usefulness of overriding existing
> class/method, but proposed feature may be used for monkey patch
> for instance.
>
> http://en.wikipedia.org/wiki/Monkey_patch
>
> There are issues as discussed in Wiki. So not having such
> feature is valid option, but it's nice to have feature. Make strlen()
> return number of chars instead of bytes, etc.
>
> I don't have concrete idea right now. If there is cleaver way that
> avoids disadvantages, I would like to see such feature by default
> since almost all PHP competitors have this.
>
> Any ideas that satisfy most of us?