Re: [RFC] Pass Scope to Magic Accessors

From: Date: Thu, 19 Jan 2023 16:29:28 +0000
Subject: Re: [RFC] Pass Scope to Magic Accessors
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-119351@lists.php.net to get a copy of this message
Hi On 1/19/23 17:23, Nicolas Grekas wrote:
Ilija and I would like to start a discussion about the following RFC: https://wiki.php.net/rfc/pass_scope_to_magic_accessors When using magic methods to access actual properties, respecting their declared visibility is often desired. Yet, accessing the calling scope to emulate the visibility restrictions is unreasonably difficult at the moment. This RFC proposes to pass the calling scope to magic accessors to make it trivial to get it.
Unless I missed anything, the RFC does not explain how the values that are passed into the second parameter will look like. What kinds of strings will be passed? When will the value be null? Best regards Tim Düsterhus

« previous php.internals (#119351) next »