php-src/Zend/tests/ns_055.phpt
2015-12-24 15:19:31 +01:00

29 lines
355 B
PHP

--TEST--
055: types 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";
}
}
$foo = new Foo();
$ex = new \Exception();
$foo->test1($foo);
$foo->test2($foo);
$foo->test3($ex);
?>
--EXPECT--
ok
ok
ok