On 05/11/2015 14:21, Niklas Keller wrote:
Hello,
I discovered today that anonymous class names contain a null byte right
after "class@anonymous". I don't think class names should contain
non-printable characters.
How about removing that null byte?
https://3v4l.org/QUKpV
https://github.com/php/php-src/blob/da8e6ec4a5063d9f60f83f43c55bc17d015cac8b/Zend/zend_compile.c#L5207
Regards, Niklas
PHP uses null bytes quite a lot to produce deliberately illegal
identifiers. For instance the old eval-like create_function() [e.g.
https://3v4l.org/hqHjh] and the serialization of private members [e.g.
https://3v4l.org/R6Y6k]
In this case, I guess the "@" in "class@anonymous" makes the name
illegal anyway, but I'm not sold on the null byte being more
unacceptable here than anywhere else.
Regards,
--
Rowan Collins
[IMSoP]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php