diff options
author | Xinchen Hui <laruence@gmail.com> | 2017-07-27 12:50:41 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2017-07-27 12:50:41 +0800 |
commit | 262aeb8ae1dbe5d45c6c3d109535a19acad7da9c (patch) | |
tree | 07667bd427334a8835de568b000df859b455772a /ext | |
parent | afc2be8fc88c05d40c755d0f06598d6b0f89e2bc (diff) | |
parent | 0ddda0dcb73502d33bc89696f0a625cbae35d2a3 (diff) | |
download | php-git-262aeb8ae1dbe5d45c6c3d109535a19acad7da9c.tar.gz |
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
Fixed test
Diffstat (limited to 'ext')
-rw-r--r-- | ext/reflection/tests/bug69802.phpt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ext/reflection/tests/bug69802.phpt b/ext/reflection/tests/bug69802.phpt new file mode 100644 index 0000000000..0a58d0b2ac --- /dev/null +++ b/ext/reflection/tests/bug69802.phpt @@ -0,0 +1,27 @@ +--TEST-- +Bug #69802 (Reflection on Closure::__invoke borks type hint class name) +--FILE-- +<?php +$f = function(stdClass $x): stdClass {}; +$r = new ReflectionMethod($f, '__invoke'); +var_dump($r->getParameters()[0]->getName()); +var_dump($r->getParameters()[0]->getClass()); +echo $r->getParameters()[0], "\n"; +echo $r->getReturnType()->getName(), "\n"; +echo $r,"\n"; +?> +--EXPECT-- +string(1) "x" +object(ReflectionClass)#4 (1) { + ["name"]=> + string(8) "stdClass" +} +Parameter #0 [ <required> stdClass $x ] +stdClass +Method [ <internal> public method __invoke ] { + + - Parameters [1] { + Parameter #0 [ <required> stdClass $x ] + } + - Return [ stdClass ] +} |