Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129968 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 219951A00BC for ; Sat, 31 Jan 2026 17:46:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1769881584; bh=x3ipFprBA5l7p85jQhINlnPyFIA5wmdIyecXw2km2is=; h=Date:From:To:In-Reply-To:References:Subject:From; b=bD2cBbpn8zyMWj6ffMHS9E3D2NTfKF44IMvOq5MVnzUKJnBdozcM96KghVzMoOZSC recwbWVc3YGxLQKad5zspj/Yc/PTbP9M8d7tOwEbdOz9PHxplTqdOBZhwy1xWFq2YF eu9ic+xNo7mgdUgEnRY7R9OME2wJSbodXl8PVGccjuMRLYxnr7aiHTPYC6vtmoJxw2 6vt4JTT89ryuFat2GfJjnwuh03WARDLJucmKfewI2qTbLb+V41POp+kE381u9vhgF/ X5kcsouqfQbVIJl1gqtLoyEzYOGsRai2CX/JuWToUDT3IgWmV5y+5m8PigKtV/Fjfx HRFXESXAaLsdQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C4F2E1801D5 for ; Sat, 31 Jan 2026 17:46:23 +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=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from outbound.ms.icloud.com (p-west3-cluster2-host5-snip4-4.eps.apple.com [57.103.74.47]) (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 ; Sat, 31 Jan 2026 17:46:13 +0000 (UTC) Received: from outbound.ms.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-west-3a-60-percent-11 (Postfix) with ESMTPS id D16BA1800719; Sat, 31 Jan 2026 17:46:05 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1769881567; x=1772473567; bh=SDOIrAgdUDL2OT97qWj3X9uBEHhr8gLs9J4LwgXTn9c=; h=Date:From:To:Message-ID:Subject:MIME-Version:Content-Type:x-icloud-hme; b=fwty0nBIx/QHolvF4taurD4CgUUTY+YL8MB0+0nr+/8GJJ4iZwtLe5s8Qn7i5C+tABKkOLOywgra/QD/ga83ZZtgPl6Sg46vDgpFWyO/RS0cfc5IoJz4dnzV7QwKvEYRI2qCF2Fk4uxKttliezzPX5qGuSAS90yRNAwk8u9RHKrC4HfLU/BY+oFxCZqd3yg15LbJ4gNnqEa9vDpQOXkRps13/LvjkUJVhK3drWoA/x5NeCRhmc2f1nYbfMmgZtpKxd4LFOht0ragi68TaM1K2JBh3HFKvE9v0H+LZ5lIAmXJq0rghJ4lEg0SEpw+2GUKnvCrWswb0noxHr6TuPoIlg== Received: from [192.168.1.170] (unknown [17.57.154.37]) by p00-icloudmta-asmtp-us-west-3a-60-percent-11 (Postfix) with ESMTPSA id 9FF9A1800393; Sat, 31 Jan 2026 17:46:01 +0000 (UTC) Date: Sat, 31 Jan 2026 18:45:52 +0100 To: internals@lists.php.net, Vadim Dvorovenko Message-ID: <019b55a4-8d06-4d88-801e-c3c2de597f1c@Spark> In-Reply-To: <53c17181-caa4-41a3-b4ab-93069e6bb47b@gmail.com> References: <53c17181-caa4-41a3-b4ab-93069e6bb47b@gmail.com> Subject: Re: [PHP-DEV] [RFC] Pipe to return X-Readdle-Message-ID: 019b55a4-8d06-4d88-801e-c3c2de597f1c@Spark Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="697e3fd5_725a06fb_12420" X-Proofpoint-ORIG-GUID: fNRhq8pFYQm__L0cxSjZcfcDnK302-Qx X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTMxMDE1MCBTYWx0ZWRfXzZd1U3E/WwhW zcaW+8/BeorlIFfGF6Rf/lmgHZdShZTy+2NvZNbqT+OyjIHBzH9tOUtIoiitf9UYr+v07IKTLaT o9OkfhS42HnNvPOn7g8xoMCK/d6MlG0/lW+jUU77j/prs5EAwvy19SpaVpu1YgjmX6PJZ90UD4S oSn3to7qEqMLaxCerAumyLYvee2SDS1fLiWJlahnwzcIFn13JMP24YRxadsrMB7ip4KBTac/shg AmIPKc5M8jb+e+lGBKWDZIqGE4l0n6S/JR2oNJpk7P5FOAXWibzyo8KH5p97r1/obiwO+AAhDo/ Wg1xo1hKspvq0vqDwRq3BvJebWkMkIhjh/tERrbW6Kj1Cj3Ld06+U36oYyXxOg= X-Authority-Info-Out: v=2.4 cv=FoAIPmrq c=1 sm=1 tr=0 ts=697e3fde cx=c_apl:c_apl_out:c_pps a=qkKslKyYc0ctBTeLUVfTFg==:117 a=vUbySO9Y5rIA:10 a=x7bEGLp0ZPQA:10 a=xKl34KcbpAAA:10 a=VkNPw1HP01LnGYTKEx00:22 a=cbVdv5xwCfduWpQoDo8A:9 a=QEXdDO2ut3YA:10 a=SSmOFEACAAAA:8 a=YWJNdcru_xXkpuu4:21 a=_W_S_7VecoQA:10 X-Proofpoint-GUID: fNRhq8pFYQm__L0cxSjZcfcDnK302-Qx X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-01-31_03,2026-01-30_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 bulkscore=0 spamscore=0 adultscore=0 lowpriorityscore=0 clxscore=1011 malwarescore=0 phishscore=0 mlxscore=0 mlxlogscore=999 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601310150 X-JNJ: AAAAAAABKGk6ezNCGqZkDcmmY6ZTUajLHCSXlo6xGDkuxC3ys8kHcL7hHnUkA01bevsDvDlSOobL5341mVjdQ0TZ0IvKPMF6nMVA77I4e37AeE0K+VNbgLcLJ+4/y9/6LqlfVnno5eRTT9RtH/LzmuxMhpL8Sf1k00xnojBAOJMYWeWLZIBErNCmFwK9qEpWjdxzltUe5YWxMkUJXINh+sFF0JfQ1vajRrhBEulUd6VHjAtlyp5ls7hs6dM90MdzTHxcuJC1GSBFCFO6fbT/oNqh4Yp4TcHzNe8vOLUxXg/am7ykVg1bTBRzioAOETFWh5J8XSSWIBUa1PEDqTtu2K1A2HWkivSOCIG0uNhO+7FIhg4NbWZsMpo2yEv/wL9lrVwitbuF1M5Kh4pSEJF/j9gFY534rIsjKy19jHRtwIe+W+1BTO4rCuK2+Ybbgw+d5PNEG9qVlinq8xVdqVXA0FWIMWBHTThECHIIVD0uR/5OIyTnRDBmb1OALLnmyIWZFahDFEg6ASKZ5PQRPbwbN2h4zUSPQlGbnfzyz5AuPbLd4lmVBEMHZ8TmpDPZ++sbbb0uXIOAlLcY/Mdh+Cy59vJZ3P2z/0t2VLA37LG0ex4f1rbWyMQH From: jordikroon@me.com (Jordi Kroon) --697e3fd5_725a06fb_12420 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, =46irst off, I appreciate the work that has gone into this R=46C. I like the general direction and I am not fully against the idea. That sa= id, I am hesitant to introduce another way to express the same thing, esp= ecially when it affects readability. Speaking only for myself, I agree with Rob=E2=80=99s point that I expect = return to appear on the left side. Placing return on the right side insid= e the pipe makes the statement harder to scan and can be confusing at fir= st glance. More importantly, I do not think the responsibility for returning should = live inside the pipe. Returning is control flow, while the pipe=E2=80=99s= core purpose is transforming data. With this change, the pipe no longer = clearly communicates =E2=80=9Ctransform this value,=E2=80=9D but can inst= ead become responsible for ending execution. I would rather see the pipe = produce a result, and keep the return outside the pipe so the intent stay= s explicit. Also, while the example below obviously would not work, it highlights the= potential ambiguity this introduces. In a long pipeline, it becomes less= clear where returning happens and what role the pipe is playing. function giveMe=46ourtyTwo() =7B return 42 =7C> return; =7D Also if you put this into the short =60fn=60 syntax. It will break for th= e same reasons as above. fn () =3D> 'hello world' =7C> strlen(...) =7C> return; Regards, Jordi --697e3fd5_725a06fb_12420 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Hello,

=46irst off, I appreciate the work that has gone into this R=46C.

I like the general direction and I am not fully against the idea. That sa= id, I am hesitant to introduce another way to express the same thing, esp= ecially when it affects readability.

Speaking only for myself, I agree with Rob=E2=80=99s point that I expect = return to appear on the left side. Placing return on the right side insid= e the pipe makes the statement harder to scan and can be confusing at fir= st glance.

More importantly, I do not think the responsibility for returning should = live inside the pipe. Returning is control flow, while the pipe=E2=80=99s= core purpose is transforming data. With this change, the pipe no longer = clearly communicates =E2=80=9Ctransform this value,=E2=80=9D but can inst= ead become responsible for ending execution. I would rather see the pipe = produce a result, and keep the return outside the pipe so the intent stay= s explicit.

Also, while the example below obviously would not work, it highlights the= potential ambiguity this introduces. In a long pipeline, it becomes less= clear where returning happens and what role the pipe is playing.

function giveMe=46ourtyTwo() =7B
    return 42 =20
        =7C> return;
=7D

Also if you put this into the short =60fn=60 syntax. It will break for th= e same reasons as above.

fn () =3D> 'hello world' =20
        =7C> strlen(...) =20
        =7C> return;

Regards,
Jordi

--697e3fd5_725a06fb_12420--