summaryrefslogtreecommitdiff
path: root/Zend/tests/ns_022.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/ns_022.phpt')
-rwxr-xr-xZend/tests/ns_022.phpt19
1 files changed, 19 insertions, 0 deletions
diff --git a/Zend/tests/ns_022.phpt b/Zend/tests/ns_022.phpt
new file mode 100755
index 0000000000..f46a856d01
--- /dev/null
+++ b/Zend/tests/ns_022.phpt
@@ -0,0 +1,19 @@
+--TEST--
+022: Name search priority (first look into import, then into current namespace and then for class)
+--FILE--
+<?php
+namespace a::b::c;
+
+import a::b::c as test;
+
+require "ns_022.inc";
+
+function foo() {
+ echo __FUNCTION__,"\n";
+}
+
+test::foo();
+::test::foo();
+--EXPECT--
+a::b::c::foo
+Test::foo