Re: PHP True Async RFC - Stage 2

From: Date: Sun, 16 Mar 2025 15:36:20 +0000
Subject: Re: PHP True Async RFC - Stage 2
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-126785@lists.php.net to get a copy of this message
Hello. > > Just one quick question for now; why is suspend() a function > and not a statement? > Yes, suspend() is a function from the Async namespace. I couldn't find any strong reasons to define it as an operator: ```php suspend(); // vs suspend; ``` For example, the spawn operator makes the code more expressive and eliminates the need for closing parentheses. await here looks more like a prefix for spawn. --- Ed.

« previous php.internals (#126785) next »