Re: [PHP-DEV] PHP True Async

2025-02-17 Thread Edmond Dantes
Hello Bilge! > Is it really necessary to have all these `Async\launchScheduler();` calls? Why can't the scheduler always be running, the same as it is in JavaScript or any other async language? Even (userland) Revolt does not require the event loop to be manually started. *Short answer:* This imp

Re: [PHP-DEV] Concept: constructor overloading syntax sugar

2025-02-17 Thread Tim Düsterhus
Hi Related to overloading, that is binding to the correct function in Java/C# at compile time, and IMO is not matching with the dynamic nature of PHP. Indeed. See: https://github.com/php/php-src/issues/17813 Best regards Tim Düsterhus

[PHP-DEV] Concept: constructor overloading syntax sugar

2025-02-17 Thread Viktor Khramov
Hi! The point is here: https://gist.github.com/vhood/665418835e65be26d5a818fded92ab75 Is it possible? May I create an RFC for this?

Re: [PHP-DEV] Concept: constructor overloading syntax sugar

2025-02-17 Thread Alexandru Pătrănescu
Hi Viktor, On Mon, Feb 17, 2025 at 4:42 PM Viktor Khramov wrote: > Hi! > > The point is here: > https://gist.github.com/vhood/665418835e65be26d5a818fded92ab75 > > Is it possible? May I create an RFC for this? > Already possible like this: class Decision { #[Main] public function __cons

Re: [PHP-DEV] PHP True Async

2025-02-17 Thread Edmond Dantes
> There should be no perceptible difference between a blocking sleep(10) and an async sleep(10), so what backwards compatibility are you referring to? For example, the behavior of the code below will not change. The code will execute sequentially, and context switching will only occur when resume

Re: [PHP-DEV] PHP True Async

2025-02-17 Thread Bilge
On 17/02/2025 18:53, Edmond Dantes wrote: I forgot to mention this. There is an important *_limitation_* in how this solution behaves in the context of PHP. Calls to PHP functions that normally block execution in the zero-Fiber do not change their behavior. This solution has both advantages

Re: [PHP-DEV] PHP True Async

2025-02-17 Thread Edmond Dantes
I forgot to mention this. There is an important *limitation* in how this solution behaves in the context of PHP. Calls to PHP functions that normally block execution in the zero-Fiber do not change their behavior. This solution has both advantages and disadvantages. The advantage is that it does n

Re: [PHP-DEV] PHP True Async

2025-02-17 Thread Edmond Dantes
Hello, Rob! It is probably best to have channels be non-buffered by default (like in > Go); buffered channels can hide architectural issues in async code. > Great point! If a channel has a default capacity greater than 1, it leads to implicit behavior that the user must be aware of. If something

Re: [PHP-DEV] Allow to easily retrieve non-default INI settings / GH PR 17459

2025-02-17 Thread Tim Düsterhus
Hi Am 2025-02-06 09:55, schrieb Tim Düsterhus: this email concerns my PR https://github.com/php/php-src/pull/17459, which extended the cli-SAPI’s `--ini` flag to print any INI settings that differ from the built-in default. There was some discussion around which flag to use, which didn't resul