Re: [PHP-DEV] [RFC] Draft - Closure self reference

2020-11-10 Thread Eugene Sidelnyk
Think the way it is implemented in JS is better than `$lambda` variable. At least it doesn't have BC breaks (does it?) On Tue, Nov 10, 2020, 7:38 PM Hans Henrik Bergan wrote: > something i'm missing from Javascript is the ability to give names to > closures, > this both gives closures the

[PHP-DEV] Was removing major version from apache module a mistake?

2020-11-10 Thread Dan Muey
Hello, Was removing the major version from apache module done on purpose or did it just kind of happen (kind of feels like an afterthought since it isn’t listed under “Backward Incompatible Changes”)? We ask because cPanel relies on the major-version pattern of the last 25 years and, while

Re: [PHP-DEV] [RFC] Draft - Closure self reference

2020-11-10 Thread Hans Henrik Bergan
something i'm missing from Javascript is the ability to give names to closures, this both gives closures the ability to reference themselves, but it also makes for meaningful stack traces, eg this is legal javascript: (function TheClosuresLocalName(){console.log(TheClosuresLocalName); throw new

Re: [PHP-DEV] [RFC] Draft - Closure self reference

2020-11-10 Thread Levi Morrison via internals
On Tue, Nov 10, 2020 at 10:09 AM Dan Ackroyd wrote: > > Hello internals, > > For reasons, I was reviewing the conversation where adding closures to > PHP was added, and it reminded me that currently the only way for a > closure to call itself is slightly terribly, so I drafted an RFC: > >

[PHP-DEV] [RFC] Draft - Closure self reference

2020-11-10 Thread Dan Ackroyd
Hello internals, For reasons, I was reviewing the conversation where adding closures to PHP was added, and it reminded me that currently the only way for a closure to call itself is slightly terribly, so I drafted an RFC: https://wiki.php.net/rfc/closure_self_reference Before I spend time on