Re: Pre-RFC Discussion: Support for String Literals as Object Properties and Named Parameters in PHP
| From: | Mike Schinkel | Date: | Tue, 03 Sep 2024 19:12:56 +0000 |
| Subject: | Re: Pre-RFC Discussion: Support for String Literals as Object Properties and Named Parameters in PHP | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-125410@lists.php.net to get a copy of this message | ||
> On Sep 3, 2024, at 7:52 AM, Anton Smirnov <sandfox@sandfox.me> wrote:
>
> On 03/09/2024 14:48, Anton Smirnov wrote:
>> [new AAA, '123AnyChars%%!@#']();
>
> Wrong example, sorry, should be
>
> (new AAA)->{'123AnyChars%%!@#'}();
Still, '123AnyChars%%!@#' is not included in the array returned by
get_class_methods() and/or ReflectionClass::getMethod() which is evidence
of why procedural magic methods are at best a bandaid compared with declarative solutions.
-Mike