php-src/Zend/tests/ns_071.phpt
Stanislav Malyshev 1b4134c07b Namespace resolution streamlining patch
[DOC] new resolution rules should be documented soon
2008-11-11 19:45:29 +00:00

22 lines
410 B
PHP

--TEST--
Testing parameter type-hinted (array) with default value inside namespace
--FILE--
<?php
namespace foo;
class bar {
public function __construct(array $x = NULL) {
var_dump($x);
}
}
new bar(null);
new bar(new \stdclass);
?>
--EXPECTF--
NULL
Catchable fatal error: Argument 1 passed to foo\bar::__construct() must be an array, object given, called in %s on line %d and defined in %s on line %d