mirror of
https://github.com/php/php-src.git
synced 2024-12-15 12:54:57 +08:00
1b4134c07b
[DOC] new resolution rules should be documented soon
22 lines
281 B
PHP
22 lines
281 B
PHP
--TEST--
|
|
Testing parameter type-hinted with default value inside namespace
|
|
--FILE--
|
|
<?php
|
|
|
|
namespace foo;
|
|
|
|
class bar {
|
|
public function __construct(\stdclass $x = NULL) {
|
|
var_dump($x);
|
|
}
|
|
}
|
|
|
|
new bar(new \stdclass);
|
|
new bar(null);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
object(stdClass)#%d (0) {
|
|
}
|
|
NULL
|