On 1/19/2023 12:40 PM, Marco Pivetta wrote:
Not just that, but `debug_backtrace()` already exists for that purpose.

I have use debug_backtrace() exactly for this purpose in the past. It was to make a protected property readable/writable, but only by certain "friend classes."

It's pretty trivial to make happen with debug_backtrace() and even more so if you wrap it in its own reusable function.

I don't see the need to implement this in the language since it's possible to achieve in userland trivially.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to