Adding new `ReflectionConstant::getFileName()`
Dear Internals,
Last week I sent a patch[1] to address a feature request[2] for a way to
identify at runtime what file a constant was declared in. Since this adds
the filename (a zend_string
) to every zend_constant
instance, it is not
the most trivial of changes.
It was suggested[3] by iluuu1994 that this may qualify as a small change
that can be merged without an RFC, if there are no objections on the
mailing list. So, are there any objections?
I'll note that the ReflectionConstant
class was added[4] as part of PHP
8.4, so it would be great if this new method could also be included as part
of the 8.4 release.
Thanks,
--Daniel Scherzer (https://github.com/DanielEScherzer)
[1] https://github.com/php/php-src/pull/15847
[2] https://github.com/php/php-src/issues/15723
[3] https://github.com/php/php-src/pull/15847#issuecomment-2345774089
[4] https://github.com/php/php-src/pull/13669
Thread (2 messages)
- Daniel Scherzer