Re: [RFC] Pipe to return

From: Date: Sat, 31 Jan 2026 13:45:45 +0000
Subject: Re: [RFC] Pipe to return
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-129965@lists.php.net to get a copy of this message
On Sat, Jan 31, 2026, at 06:52, Vadim Dvorovenko wrote: > Introducing Pipe to return RFC > > https://wiki.php.net/rfc/pipe_to_return > > In short, RFC proposes piping expression result to return to be > used together with pipe operator to reduce cognitive load > > "Hello World" |> strlen > <http://www.php.net/strlen>(...) |> return; > -- > > Vadim Dvorovenko > Interesting, and thank you for the RFC. As a programmer though, I find being able to scan the left-most columns for return statements quite useful. Having to now also scan the right-most when pipes are involved (which could even mean off the edge of the screen) ... not ideal. I get I could just ... not do that ... but since this seems to be about cognitive load, I think this would actually add additional cognitive load instead of removing it. Often, you need to find where the function returns; more often than you need to read actual pipes. — Rob

« previous php.internals (#129965) next »