Bug #69802 [Asn->Csd]: Reflection on Closure::__invoke borks type hint class name
| From: | dmitry@php.net | Date: | Mon, 15 Jun 2015 12:45:15 +0000 |
| Subject: | Bug #69802 [Asn->Csd]: Reflection on Closure::__invoke borks type hint class name | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-193505@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69802&edit=1
ID: 69802
Updated by: dmitry@php.net
Reported by: nikic@php.net
Summary: Reflection on Closure::__invoke borks type hint
class name
-Status: Assigned
+Status: Closed
Type: Bug
Package: Reflection related
PHP Version: 7.0Git-2015-06-11 (Git)
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=33e71d5c20ebdaaee9c4d12a82f65ae2cded7cbc
Log: Fixed bug #69802 (Reflection on Closure::__invoke borks type hint class name)
Previous Comments:
------------------------------------------------------------------------
[2015-06-11 19:08:12] nikic@php.net
Description:
------------
<?php
$f = function(stdClass $x) {};
$r = new ReflectionMethod($f, '__invoke');
var_dump($r->getParameters()[0]->getClass());
results in:
Fatal error: Uncaught ReflectionException: Class does not exist ...
because the via-handler function is INTERNAL, while the arginfo uses USER layout. Basically the
comment in http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_closures.c#210
is not true where Reflection is concerned.
Maybe we need another flag to specify the arginfo layout independently from the type of the
function?
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69802&edit=1