diff options
-rwxr-xr-x | Zend/tests/ns_055.phpt | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Zend/tests/ns_055.phpt b/Zend/tests/ns_055.phpt new file mode 100755 index 0000000000..83d0613c1e --- /dev/null +++ b/Zend/tests/ns_055.phpt @@ -0,0 +1,33 @@ +--TEST-- +055: typehints in namespaces +--FILE-- +<?php +namespace test::ns1; + +class Foo { + function test1(Foo $x) { + echo "ok\n"; + } + function test2(test::ns1::Foo $x) { + echo "ok\n"; + } + function test3(Exception $x) { + echo "ok\n"; + } + function test4(::Exception $x) { + echo "ok\n"; + } +} + +$foo = new Foo(); +$ex = new Exception(); +$foo->test1($foo); +$foo->test2($foo); +$foo->test3($ex); +$foo->test4($ex); +?> +--EXPECT-- +ok +ok +ok +ok |