mirror of
https://github.com/php/php-src.git
synced 2024-12-24 17:30:48 +08:00
1b4134c07b
[DOC] new resolution rules should be documented soon
25 lines
320 B
PHP
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) {
|
|
}
|