xref: /PHP-7.4/Zend/tests/ns_074.phpt (revision 782352c5)
1--TEST--
2Testing type-hinted lambda parameter inside namespace
3--FILE--
4<?php
5
6namespace foo;
7
8$x = function (\stdclass $x = NULL) {
9	var_dump($x);
10};
11
12class stdclass extends \stdclass { }
13
14$x(NULL);
15$x(new stdclass);
16$x(new \stdclass);
17
18?>
19--EXPECTF--
20NULL
21object(foo\stdclass)#%d (0) {
22}
23object(stdClass)#%d (0) {
24}
25