summaryrefslogtreecommitdiff
path: root/Zend/tests/use_function/ignore_constants.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/use_function/ignore_constants.phpt')
-rw-r--r--Zend/tests/use_function/ignore_constants.phpt23
1 files changed, 23 insertions, 0 deletions
diff --git a/Zend/tests/use_function/ignore_constants.phpt b/Zend/tests/use_function/ignore_constants.phpt
new file mode 100644
index 0000000000..c50ff7357a
--- /dev/null
+++ b/Zend/tests/use_function/ignore_constants.phpt
@@ -0,0 +1,23 @@
+--TEST--
+use function should ignore namespaced constants
+--FILE--
+<?php
+
+namespace foo {
+ const bar = 42;
+}
+
+namespace {
+ const bar = 43;
+}
+
+namespace {
+ use function foo\bar;
+ var_dump(bar);
+ echo "Done\n";
+}
+
+?>
+--EXPECT--
+int(43)
+Done