Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130002 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 7B6251A00BC for ; Wed, 4 Feb 2026 08:17:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1770193043; bh=lrmS2SCGNJaPlEITBFuQYChurxgO/3R1i/YGdqWUHiI=; h=References:In-Reply-To:From:Date:Subject:To:From; b=dh2NzI05ZfUiBC5DDUt/9Be1bSlEM2WSdiKwIWnVtjiOXcxiXln6TatxTfrToMlYX LoJnzOCjgx/0L5PUbHflSTJCZfsdNwswcAH+ksluYmnkpHE85ZQgXVz0KWazDjIFp+ B1Mtr90HExdgGCW41+YOMb04QhSvVu4VCzyuJQYnLXJLMSPvFwbBwKoZMlzVbJKct6 wO0Jf0ENfDxl+pHW8QEYbEaglR7o9YtmbJM0ZJ2y3OZGkWOPsoC8gF6jTUw7mrAvZm Ec8IxNDiAHbW0A0ETf2oeU//SBxILvUgUIaHjh2oY4V4x3rRWr3MwMOUGWSyWIj/by kMgnDklR8K98g== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 35FC4180081 for ; Wed, 4 Feb 2026 08:17:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_50, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 4 Feb 2026 08:17:08 +0000 (UTC) Received: by mail-qk1-f178.google.com with SMTP id af79cd13be357-8c6b16bd040so720761485a.1 for ; Wed, 04 Feb 2026 00:17:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1770193023; cv=none; d=google.com; s=arc-20240605; b=g31GEpbg6YtusIaUUaHdF2G33RFRSnGtt/ROcGcsLKrtSl+eFUX2GDlGloDBM5fHHu Cipnfucd9e1nHPBKhoKO62GaXI8k0F1mwsFcfExFg/YV1Rk/66bAG8EPSybS5J9S/neE HPVfYePKOHcrcmVYlQN3TcU54/qTkonNbUdh2iVZJHRIfT9FdzLwQopZXc78tCTNLAlM CZwqzkFD6+r7DCHQ/UduL/HSb24AyMYLrD1DJ3l0IebRc4iRuPPa+OXRvgif0FiV9Omw 89BsvJ0Gi0pkfOQCTSRcLa1YP8hKzJlzu7eydVMhOAm1opo6jnlL5VSL26KEG6xlGesT AQfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=CwCfaDfy81YjHfr0tQS7+Cogt3eKDduOLFuf7AvAI9M=; fh=5KvmJ5K5QBymFDNCdtgpPKEwgSxqOQnCzLzHVTYb8GE=; b=YjRSjOs4E3F3OIwKjZYY16jbL2CqoCsjsipoVskS3nS1k082xkxWlwfkgSZHabv9Hp m+k17/K60Pfl8WcdVHtI01kp8zwdHjQznK2JmIgSRHU1de93v0dQIVXFOf2nvtN0PfTR lCXHh0Ad6PxZKD5MzCsqr8zJQicMSa9LdSt1GDYgGArw0r6iTnZvDTGtC6BAJzELBVe4 DUb242SuJCsBKZw8s1TwEDrqT233r+nDNJS16hF7C+CeT/A1SrVjTzqcxgCEH1qnR7G4 CC+gPqcwybvFxFxBwODpZQhjianJfZ9nO4qSq4qAUMBJ5NHXnjegn1R/MWV9p6GmXMip Kz0g==; darn=lists.php.net ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770193023; x=1770797823; darn=lists.php.net; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=CwCfaDfy81YjHfr0tQS7+Cogt3eKDduOLFuf7AvAI9M=; b=MH36jbdL2tkkjDJG+L+khhDlMHNoZ8LMipy01Vv780B3sWo9Oe5SeJ/M2cgAxalhc0 Xxc1STqhjO7mnXUxXkRyPJe1aPGYDs6T5wolrZMnolnkjCj5w3cyYrYJ7Iit2DHpTt5s 51fUVBiD2pohkMuiIvf7iijsIn+EkLXJOjlyl+GP3hxFeG18PzRRgHfF2gpq0+M+KihV ZzFAzZrHocH/bXpK6t67Icwcw/eeF5pslDDzlutUlenKLIOhM7UOOdSTnCIxgNQbp2aP XKHNzWKqaq3EdMrwjpf1RLH/xK6Qtyr0okUZsRVykvXleNSCALVauCycfz9n6774nWuY mazQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770193023; x=1770797823; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CwCfaDfy81YjHfr0tQS7+Cogt3eKDduOLFuf7AvAI9M=; b=TT8BGtHkP3J/LVakLS439wkbhoKotoy79Bpo9kqheHP39D/SWtJx7ey4TOrXIqbnfl FMIK50PrfYnYXEt7Crqd+5qnMpAh4A4KFqya7aQaXkgHVdxuEip898F4YU3U39vEgHX2 xYL8LjNpGB0kJtE0acNKHor11tAQIoT6NbvDqeHUGjWR7Xlx7sxg3o8++iRK1Tt/8/J7 XDUp+vMbjS5F7DjCdkjPQFvCgn+CsQJs4YxnU8vneoNaXDFqB9He3XHZ+LhUg8yDQ6XA nK/WovtuDpDQNWo7Z8oxG8NXxJk8yQd0egwn8vWh698kSMklHo2dRMbZ3/94dxGVN46J wkQw== X-Gm-Message-State: AOJu0YyrUs7Hv1dPTiEK/RXmYd56g88XHY8UxNQwkQLXitQVzhDMKzoz CWfkoogtV+fBfo/yz6q9fLPzE2HhqJdVqnVE33vi/qn9eMFhGB0zq5YR3/DGPn582r41CzU+Sr1 kPqhMw0f4N/HqhnviRIyE0zYvHpcPGb65+AyQ X-Gm-Gg: AZuq6aKkqVrgU/3SU6JBd9GRFE0mpyMAQnLh1H4lyC4Clg4lAEKKxXQmuaszhFxP354 42mMMg27NVj3q9kmzm/jycIKWgmBnsVrmpf59glW/eA3VBjUMj7NMtFPq2uRu5+3qyeJ87lKTji Bcjn6RB86+C3PrIPzTNSuZhr5ENegnruAnOTuAfrwAvAoxEPthCqg7MTIs3JN0RtmSIfw02PPj1 4J7Z4qPi3AV/gqkdkdPHaJhxvGf1bwL4ZTkF4Lu6lmN+2Hs5MVlxSmAnPXqGz7HgHQajPqoqdK3 Zsmwk3X6UxIuf7aUto/uxZAp9g/wFQ== X-Received: by 2002:a05:620a:4089:b0:8b2:37ff:de74 with SMTP id af79cd13be357-8ca2f8653c7mr266604085a.34.1770193023004; Wed, 04 Feb 2026 00:17:03 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: <53c17181-caa4-41a3-b4ab-93069e6bb47b@gmail.com> In-Reply-To: <53c17181-caa4-41a3-b4ab-93069e6bb47b@gmail.com> Date: Wed, 4 Feb 2026 12:16:53 +0400 X-Gm-Features: AZwV_Qj424DVwTH888Yvefuw2f5HAX5t6IpZtylZj1wrs4dyJts9q3ILPPgEN50 Message-ID: Subject: Re: [PHP-DEV] [RFC] Pipe to return To: internals@lists.php.net Content-Type: multipart/alternative; boundary="00000000000051f5c50649fb2ebb" From: oleksii.bulba@gmail.com (Oleksii Bulba) --00000000000051f5c50649fb2ebb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Jan 31, 2026 at 9:52=E2=80=AFAM 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 (...) |> return; > > -- > > Vadim Dvorovenko > Hi Vadim, thanks for the RFC =E2=80=94 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 --00000000000051f5c50649fb2ebb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Jan 31, 2026 at 9:52=E2=80=AFAM Vadim= Dvorovenko <vadim.dvorove= nko@gmail.com> wrote:
=20 =20 =20

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(.=
..) |> return;

--

Vadim Dvorovenko

Hi Vadim,

thanks for the RFC =E2=80=94 the idea of piping into= return is interesting.

One question about semantics: what wou= ld be the expected behavior if there is another pipe operand after <= code>return? For example:

$foo |> return |> bar(...);

Would this be a compile-time error, a no-op after return, or is return<= /span> intended to be a hard terminal in the pipe chain by def= inition?

Best regards,
Oleksii

--00000000000051f5c50649fb2ebb--