mirror of
https://github.com/php/php-src.git
synced 2024-12-25 01:40:50 +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
|