Re: Null bytes in anonymous class names
| From: | Leigh | Date: | Mon, 09 Nov 2015 16:48:57 +0000 |
| Subject: | Re: Null bytes in anonymous class names | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-89126@lists.php.net to get a copy of this message | ||
On 9 November 2015 at 15:27, Steven Hilder
>
>
> So, I prepared a patch for
get_class() and
> ReflectionClass::getName(),
> which in my view should behave the same way as var_dump() etc.,
> but I've
> now realised that ignoring the unique suffix from the class name will break
> functionality that is otherwise desirable:
>
Can you share your patch?
It should be possible to return the sanitised name without removing it
internally.(would have to cover the get_parent_class and getParentClass
versions too, and have a quick audit of other places class names can be
spat out.)
Can we at least get the memory address hidden (non-debug builds only
perhaps? - var_dump appends a #n why not just use this number.)