Hi Michael, On 16 July 2016 at 16:33, Michael Vostrikov <michael.vostri...@gmail.com> wrote: > Hello. > I have created RFC about context-dependent escaping operator. > https://wiki.php.net/rfc/escaping_operator > > Initial discussion was here: http://marc.info/?t=146619199100001
I'm more than slightly sceptical about this RFC's chances, but to give you some feedback, this bit is a bad pattern: > bool PHPEscaper::registerHandler(string $context, callable $escaper_function) > > Registers new handler for a given context. If handler for this context is > already > registered, it returns false, on success registration returns true. It would be better to return the previous handler, or NULL if one wasn't set, in the same way as set_error_handler() does, and for the same reasons. Also, shouldn't these just be functions? Why is there a class involved when it only has static functions/state? cheers Dan -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php