php-src/Zend/tests/ns_074.phpt
Stanislav Malyshev 1b4134c07b Namespace resolution streamlining patch
[DOC] new resolution rules should be documented soon
2008-11-11 19:45:29 +00:00

25 lines
320 B
PHP

--TEST--
Testing type-hinted lambda parameter inside namespace
--FILE--
<?php
namespace foo;
$x = function (\stdclass $x = NULL) {
var_dump($x);
};
class stdclass extends \stdclass { }
$x(NULL);
$x(new stdclass);
$x(new \stdclass);
?>
--EXPECTF--
NULL
object(foo\stdclass)#%d (0) {
}
object(stdClass)#%d (0) {
}