mirror of
https://github.com/php/php-src.git
synced 2024-12-14 04:16:30 +08:00
Fix issue with global fallback when not in global space
This commit is contained in:
parent
e14a769c56
commit
d7e3aca9c9
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…
Reference in New Issue
Block a user