2008-11-10 11:39:35 +00:00
|
|
|
--TEST--
|
|
|
|
Testing type-hinted lambda parameter inside namespace
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace foo;
|
|
|
|
|
2018-09-16 17:16:42 +00:00
|
|
|
$x = function (\stdclass $x = NULL) {
|
2020-02-03 21:52:20 +00:00
|
|
|
var_dump($x);
|
2008-11-10 11:39:35 +00:00
|
|
|
};
|
|
|
|
|
2008-12-04 20:12:30 +00:00
|
|
|
class stdclass extends \stdclass { }
|
2008-11-10 11:39:35 +00:00
|
|
|
|
|
|
|
$x(NULL);
|
|
|
|
$x(new stdclass);
|
2008-12-04 20:12:30 +00:00
|
|
|
$x(new \stdclass);
|
2008-11-10 11:39:35 +00:00
|
|
|
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
|
|
|
NULL
|
2008-12-04 20:12:30 +00:00
|
|
|
object(foo\stdclass)#%d (0) {
|
2008-11-10 11:39:35 +00:00
|
|
|
}
|
2008-12-04 20:12:30 +00:00
|
|
|
object(stdClass)#%d (0) {
|
2008-11-10 11:39:35 +00:00
|
|
|
}
|