On Sat, Jan 31, 2026 at 9:52 AM Vadim Dvorovenko <vadim.dvorovenko@gmail.com> wrote:
Introducing Pipe to return RFC
https://wiki.php.net/rfc/pipe_to_return
In short, RFC proposes piping expression result to
returnto be used together with pipe operator to reduce cognitive load"Hello World" |> [strlen](http://www.php.net/strlen)(...) |> return;–
Vadim Dvorovenko
Hi Vadim,
thanks for the RFC — the idea of piping into return is interesting.
One question about semantics: what would be the expected behavior if there is another pipe operand after return? For example:
$foo |> return |> bar(...);
Would this be a compile-time error, a no-op after return, or is return intended to be a hard terminal in the pipe chain by definition?
Best regards,
Oleksii