Hi
Am 2025-10-13 19:00, schrieb Arnaud Le Blanc:
- How does it interact with
`ReflectionFunctionAbstract::getClosureUsedVariables()`?
- Same question for other scope introspection functionality (e.g.
Xdebug).
getClosureUsedVariables() and other introspection functionality will
report any used var as usual. Used vars are named after the parameter
if there is no collision. But this should not be considered API as
this may change. For instance, I want to optimize-out used vars for
parameters that are pre-filled with a literal. It would be possible to
hide used vars of a PFA in Reflection.
Understood, thank you for the clarification. Please add this information
to the RFC (ideally with examples of the possible cases, e.g. the
passing of the `Closure` object). It's fine if you explicitly say “we
consider this an implementation detail, but this is how it currently
works”. This is also useful information to have if a user reports a bug
in PFA that relates to this, so that we can tell them “what you are
doing is not guaranteed to work, please don't”.
Best regards
Tim Düsterhus