2007-11-09 21:35:22 +08:00
|
|
|
--TEST--
|
2015-10-21 00:50:13 +08:00
|
|
|
055: types in namespaces
|
2007-11-09 21:35:22 +08:00
|
|
|
--FILE--
|
|
|
|
<?php
|
2008-12-05 04:12:30 +08:00
|
|
|
namespace test\ns1;
|
2007-11-09 21:35:22 +08:00
|
|
|
|
|
|
|
class Foo {
|
|
|
|
function test1(Foo $x) {
|
|
|
|
echo "ok\n";
|
|
|
|
}
|
2008-12-05 04:12:30 +08:00
|
|
|
function test2(\test\ns1\Foo $x) {
|
2007-11-09 21:35:22 +08:00
|
|
|
echo "ok\n";
|
|
|
|
}
|
2008-12-05 04:12:30 +08:00
|
|
|
function test3(\Exception $x) {
|
2007-11-09 21:35:22 +08:00
|
|
|
echo "ok\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$foo = new Foo();
|
2008-12-05 04:12:30 +08:00
|
|
|
$ex = new \Exception();
|
2007-11-09 21:35:22 +08:00
|
|
|
$foo->test1($foo);
|
|
|
|
$foo->test2($foo);
|
|
|
|
$foo->test3($ex);
|
|
|
|
?>
|
|
|
|
--EXPECT--
|
|
|
|
ok
|
|
|
|
ok
|
|
|
|
ok
|