Re: [RFC] Pass Scope to Magic Accessors

From: Date: Tue, 24 Jan 2023 15:51:14 +0000
Subject: Re: [RFC] Pass Scope to Magic Accessors
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-119419@lists.php.net to get a copy of this message
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.

« previous php.internals (#119419) next »