Re: [RFC] Importing namespaced functions
| From: | Igor Wiedler | Date: | Tue, 20 Aug 2013 21:29:39 +0000 |
| Subject: | Re: [RFC] Importing namespaced functions | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-68588@lists.php.net to get a copy of this message | ||
Hi Stas,
Thanks for the notes. I will address these issues, hopefully during the next few days.
Good job spotting them!
Regards,
Igor
On Aug 19, 2013, at 3:32 AM, Stas Malyshev <smalyshev@sugarcrm.com> wrote:
> Hi!
>
>> RFC: https://wiki.php.net/rfc/use_function
>> Patch: https://github.com/php/php-src/pull/388
>
> Looking at the patch:
>
> 1. use function bar as bar;
> does not produce any warning
>
> 2.
> use function x\foo as bar;
>
> function bar() {
> echo "OK!";
> }
>
> Does not produce any warnings or errors, though it should be.
>
> 3. This code:
> namespace x;
> use foo as bar;
> use function foo as bar;
> bar();
>
> Produces a crash.
>
> I would suggest this patch needs a bit more work on corner cases.
>
> --
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/
> (408)454-6900 ext. 227