Req #80071 [Opn]: Expose closure uses through reflection
Edit report at https://bugs.php.net/bug.php?id=80071&edit=1
ID: 80071
Updated by: nikic@php.net
Reported by: michael dot vorisek at email dot cz
-Summary: Function "use" variables must be accessible thru
reflection
+Summary: Expose closure uses through reflection
Status: Open
Type: Feature/Change Request
Package: Reflection related
Operating System: any
PHP Version: 7.4.10
Block user comment: N
Private report: N
New Comment:
Uses are accessible as part of getStaticVariables(), though not distinguished from other static
variables.
Previous Comments:
------------------------------------------------------------------------
[2020-09-07 07:48:48] michael dot vorisek at email dot cz
Description:
------------
Reflection should provide full access to all all function details.
"use" variables should be accessible as well
usecase: https://github.com/atk4/core/pull/272/files#diff-08f44384ad9646881f3b84d38f3e8d92R54
like function is checked if it is bound, there should be also a check if function uses
"use"
Test script:
---------------
this is currently not possible, this is a feature request
Actual result:
--------------
n/a
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80071&edit=1
Thread (4 messages)