mirror of
https://github.com/php/php-src.git
synced 2025-08-18 23:18:56 +02:00
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1: Fixed test
This commit is contained in:
commit
262aeb8ae1
1 changed files with 1 additions and 1 deletions
27
ext/reflection/tests/bug69802.phpt
Normal file
27
ext/reflection/tests/bug69802.phpt
Normal file
|
@ -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 ]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue