On 03/04/2016 03:49 PM, Johannes Schlüter wrote:
On Fri, 2016-03-04 at 12:29 -0600, Stephen Coakley wrote:
Not a complete polyfill, since $newfunc is a closure and not a string,
so you cannot print out the function name. I have no idea if any code
relies on the lambda itself being a string though.

This has impact on a few things, i.e. Reflection or users might guess
the name. Anyways: Take away: A polyfill won't be 100% identical.

However the typical use case should be around usort() or similar where
this doesn't matter.

johannes


I'm not entirely sure about what you mean. On my system, create_function returns something like '\x00lambda_1'. Do you mean that users are guessing such a string in order to use it? Sounds like the smelliest of code smells.

--
Stephen

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to