summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Ferrara <ircmaxell@gmail.com>2013-08-30 11:53:57 -0400
committerAnthony Ferrara <ircmaxell@gmail.com>2013-08-30 11:53:57 -0400
commitd7e3aca9c96e93acfee2deeeb7b481cadd28438d (patch)
tree988f0f1d224eb0d54bb369b9f17c9eb1939df87b
parente14a769c56f45be26f32506483a7dff5b447fbb7 (diff)
downloadphp-git-d7e3aca9c96e93acfee2deeeb7b481cadd28438d.tar.gz
Fix issue with global fallback when not in global space
-rw-r--r--Zend/tests/use_function/no_global_fallback2.phpt18
1 files changed, 18 insertions, 0 deletions
diff --git a/Zend/tests/use_function/no_global_fallback2.phpt b/Zend/tests/use_function/no_global_fallback2.phpt
new file mode 100644
index 0000000000..5d012c10e5
--- /dev/null
+++ b/Zend/tests/use_function/no_global_fallback2.phpt
@@ -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