Re: [PHP-DEV] [Discussion] Thoughts on casting to null

2024-02-15 Thread Hans Henrik Bergan
EventLoop::repeat($pingInterval, function(...$args)use($client){$client->ping(...$args)});

Re: [PHP-DEV] [Discussion] Thoughts on casting to null

2024-02-15 Thread Григорий Senior PHP / Разработчик Web
I don't even know why lambda realization is not the same as in javascript. ``` let action = function () { console.log('hello'); return 1; } let fn1 = () => action(); console.log(fn1()); // calls hello(), returns 1, for me, not a best way, could be read like "call action() then create function th

Re: [PHP-DEV] [Discussion] Thoughts on casting to null

2024-02-14 Thread Ilija Tovilo
Hi Robert On Wed, Feb 14, 2024 at 1:29 AM Robert Landers wrote: > > I won't be the first to say this, at first glance, casting to null > sounds silly, but short arrow functions must always return something, > by design. That's when casting to null makes any sense at all (that I > can think of): y