mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix issue with global fallback when not in global space
This commit is contained in:
parent
e14a769c56
commit
d7e3aca9c9
1 changed files with 18 additions and 0 deletions
18
Zend/tests/use_function/no_global_fallback2.phpt
Normal file
18
Zend/tests/use_function/no_global_fallback2.phpt
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
--TEST--
|
||||||
|
non-existent imported functions should not be looked up in the global table
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
function test() {
|
||||||
|
echo "NO!";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
namespace foo {
|
||||||
|
use function bar\test;
|
||||||
|
test();
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
--EXPECTF--
|
||||||
|
Fatal error: Call to undefined function bar\test() in %s on line %d
|
Loading…
Add table
Add a link
Reference in a new issue