mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Add test case for conflicting use and use function alias (stas)
This commit is contained in:
parent
4adf49eeaf
commit
2dbbb8ae4b
1 changed files with 20 additions and 0 deletions
20
Zend/tests/use_function/conflicting_use_alias.phpt
Normal file
20
Zend/tests/use_function/conflicting_use_alias.phpt
Normal file
|
@ -0,0 +1,20 @@
|
|||
--TEST--
|
||||
use and use function with the same alias
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
namespace {
|
||||
function foo() {
|
||||
return 'foo';
|
||||
}
|
||||
}
|
||||
|
||||
namespace x {
|
||||
use foo as bar;
|
||||
use function foo as bar;
|
||||
var_dump(bar());
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
string(3) "foo"
|
Loading…
Add table
Add a link
Reference in a new issue