Re: [RFC] Importing namespaced functions
| From: | Stas Malyshev | Date: | Mon, 19 Aug 2013 01:32:08 +0000 |
| Subject: | Re: [RFC] Importing namespaced functions | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-68561@lists.php.net to get a copy of this message | ||
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