diff options
Diffstat (limited to 'Zend/tests/use_const/alias.phpt')
-rw-r--r-- | Zend/tests/use_const/alias.phpt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Zend/tests/use_const/alias.phpt b/Zend/tests/use_const/alias.phpt new file mode 100644 index 0000000000..f179393006 --- /dev/null +++ b/Zend/tests/use_const/alias.phpt @@ -0,0 +1,26 @@ +--TEST-- +aliasing imported constants to resolve naming conflicts +--FILE-- +<?php + +namespace foo { + const baz = 42; +} + +namespace bar { + const baz = 43; +} + +namespace { + use const foo\baz as foo_baz, + bar\baz as bar_baz; + var_dump(foo_baz); + var_dump(bar_baz); + echo "Done\n"; +} + +?> +--EXPECT-- +int(42) +int(43) +Done |