Bug #67133 [Opn->Nab]: Aliasing of aliased methods does not work
| From: | requinix@php.net | Date: | Sat, 26 Apr 2014 01:43:57 +0000 |
| Subject: | Bug #67133 [Opn->Nab]: Aliasing of aliased methods does not work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-185447@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67133&edit=1
ID: 67133
Updated by: requinix@php.net
Reported by: liranuna at gmail dot com
Summary: Aliasing of aliased methods does not work
-Status: Open
+Status: Not a bug
Type: Bug
Package: *General Issues
Operating System: Any
PHP Version: 5.6.0beta1
Block user comment: N
Private report: N
New Comment:
> It is possible to re-alias an already imported function
It's not. Have you seen something suggesting that it is?
Previous Comments:
------------------------------------------------------------------------
[2014-04-26 00:56:54] liranuna at gmail dot com
Description:
------------
A new feature added in 5.6 allows functions to be imported and aliased.
It is possible to re-alias an already imported function but that does not seem to work.
Test script:
---------------
<?php
namespace foo\bar {
function baz() { return __FUNCTION__; }
}
namespace {
use function foo\bar\baz as foobarbaz;
use function foobarbaz as foobar;
var_dump(foobar());
}
Expected result:
----------------
string(11) "foo\bar\baz"
string(11) "foo\bar\baz"
Actual result:
--------------
string(11) "foo\bar\baz"
Fatal error: Call to undefined function foobarbaz() in %s/test_case.php on line 12
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67133&edit=1