Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91506 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70280 invoked from network); 5 Mar 2016 03:50:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Mar 2016 03:50:39 -0000 X-Host-Fingerprint: 70.194.102.235 235.sub-70-194-102.myvzw.com Received: from [70.194.102.235] ([70.194.102.235:22490] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B4/E1-45689-E875AD65 for ; Fri, 04 Mar 2016 22:50:38 -0500 Message-ID: To: internals@lists.php.net References: <24.F3.62769.A4226C65@pb1.pair.com> <1457099585.14527.13.camel@kuechenschabe> <3C.51.25279.E14D9D65@pb1.pair.com> <1457128169.14527.21.camel@kuechenschabe> Date: Fri, 4 Mar 2016 21:50:34 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1457128169.14527.21.camel@kuechenschabe> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Posted-By: 70.194.102.235 Subject: Re: [PHP-DEV] Re: [RFC] Deprecations for PHP 7.1 From: me@stephencoakley.com (Stephen Coakley) 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