xref: /php-src/Zend/tests/ns_073.phpt (revision 08b2ab22)
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
12$x(NULL);
13$x(new \stdclass);
14
15?>
16--EXPECTF--
17Deprecated: {closure:%s:%d}(): Implicitly marking parameter $x as nullable is deprecated, the explicit nullable type must be used instead in %s on line %d
18NULL
19object(stdClass)#%d (0) {
20}
21