summaryrefslogtreecommitdiff
path: root/Zend/tests/ns_074.phpt
blob: 9fd8699aec73662f140a9a013c6d49489c6d8550 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--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) {
}