Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128143 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 B81021A00BC for ; Sun, 20 Jul 2025 10:23:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1753006885; bh=oPNoEmB62TS5vLKVjsQ3jepN62tack0WbKEuWnqZO7w=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=WJwKdydfPyXcgiM5jkm7n6rNXPYcldT6Q1NtLZXj3LKzu9E9NEMwF5RnlzHRscPHx aJW9U/K3gGKCMbJ95/8QhPBjXPR/PWzWhATktmjhTSBVwhIwCQjhmUGC/EVC4uVEgQ m2QYl4B16HyUfu2l1iB1wr+47hXmCqsUYlpKeN+a8VgMTZdg1hMdmeXkHNZe4w8wgH lqWUrwrBTXTSfpbdl/4xt1j4HTxE/ZH2BJI2ehZ7bXL3tjSHvPLQedFMSRDzwsjo5v yPmZM3mcRpfdTFD2ttnmwnKhAz14v+LY/ChTu2MoZt9s78J+R9E8Wn3ArVp6hwRVqk ZdYzyoVsI1HrA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9D293180074 for ; Sun, 20 Jul 2025 10:21:24 +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.4 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, 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: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) (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 ; Sun, 20 Jul 2025 10:21:24 +0000 (UTC) Received: by mail-qv1-f43.google.com with SMTP id 6a1803df08f44-6fa980d05a8so20713646d6.2 for ; Sun, 20 Jul 2025 03:23:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1753006990; x=1753611790; darn=lists.php.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=yqmxXmPQBDkqsm+T3Gvb953HQN73lHBdG+Esw6PWeyU=; b=Hmbmfv/0xx/Q10sRdT3rCnkbULSCn5jSIiyj4U78yAPjyyBaln5d8JryBMuOJFfq1s rkCIRx4vPbOIWMcxh//H4+DyEFoMiILjuOQ915Ot6ZI+qfKftf8MoEp/FrVtZBpyTofQ w1apCQEDqGQalHBp/QX7dywpwStTb0OLQNGqaF/+T9iGKqZGu2fvZ2+Z+dJAk+b/TJxh tYeayrY70mm3+MBt9B5aWjB1rpLKzbAdewNNTgtEuGzAnByQVxMW3oq4f5FpcpBHud15 k1j2H4JhDYWIe4dhzVfH1E++7TVQ59foVnWdRfysjLJi74YfzAVmUq0+G+N7LTnVlhYU zArA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753006990; x=1753611790; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yqmxXmPQBDkqsm+T3Gvb953HQN73lHBdG+Esw6PWeyU=; b=udOTiVAYgUodlHZjA+HPzsIGlBPcsVtIgHCop7op10F4+KfO6GQZ+n3r/wWVpzIYrW ugZd7kpuZW2juMrQvNtSWetJQqw0xjqLmaSY0xYJY7td0C2Jf9s48Bu2PnwWw37Qnk4F dud+66YvTyooKkehGtOmWSCw8jkj8RKtNRyakibVC+JM7N9Vc9NBYakoWgNavBKMRekH ZSOpJL2gXfk+sQUb7Of5uOb4eQ0Ndklzwx71kLq2zfXTl/bEt5QzDlBSd4dqyYEa4+3J 7DMrlc4tsDpjnN/pc3ixXpdaVetubFRHxPPsTyLYro2Qlc8b8xSZpvAzdun+YYuyzJN7 J6RA== X-Gm-Message-State: AOJu0Yyam7FbCrKJHWEvuK0Fno7vC8jyxOXBcAmovMYvVwhJdeU1HE+t JnuNOyVRc93Zrv/fPPxl/tVs634Mkgx0LbhiuWVjyWnRo2nNVDDEs+RYHaH6dYmNmofaKtstbzI BePX5NEYjkhVTj/t+CbSRNItldBByLyZD4cDDcNOh3Q== X-Gm-Gg: ASbGncu+yQHXPKI4s68mlKID/V/bZgtvU7J14X0b7nHM9OTs6O6OSFWCmodytKgjS8K K9MjhooLV3jXUOlSH8XpCg/19/cJ7vi/wUzoQN9v09vcj96aAvjqEC0aBd2U+SIIk4e6LDBsWlz DibFWy+dIJcWmllL1W+LO+mUb2i3T7t8Sb53xpxc92g6lA0WeQpPdyQ73uPhaP3SWzOMejZEGQs Fb91tbppwbzmBpw/ebm92zNnaZIc7mXSOT519YMRg== X-Google-Smtp-Source: AGHT+IF17/oGxVnyG9xYSd2b49qcOYTKIoMxmZRnBXRWlI+NsOeoNpxtDaBDtvRnOf11Wg6f1/KwXx+kW/Tv3j9/DeE= X-Received: by 2002:a05:6214:2d4a:b0:702:b105:5e76 with SMTP id 6a1803df08f44-704f4b4d4eemr257030856d6.42.1753006989530; Sun, 20 Jul 2025 03:23:09 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <2e8a8375-62ec-4bb2-86ed-7432f389e683@gmail.com> In-Reply-To: <2e8a8375-62ec-4bb2-86ed-7432f389e683@gmail.com> Date: Sun, 20 Jul 2025 12:22:58 +0200 X-Gm-Features: Ac12FXxV7fbycewS_3h0IrgNoQXub8vNWBTCbZCTP-5Xbw7r42_7UZ8xKOZEXLc Message-ID: Subject: Re: [PHP-DEV] Proposal. Pipeline assignment operator To: Vadim Dvorovenko Cc: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: tovilo.ilija@gmail.com (Ilija Tovilo) Hi Vadim Thanks for your follow-up. On Sun, Jul 20, 2025 at 11:54=E2=80=AFAM Vadim Dvorovenko wrote: > > Recently introduced pipeline operator is great, but together with > assignment operator it will lead to mixing top-to-bottom and > bottom-to-top code reading directions and vertigo. > > To reduce this problem i'd like to discuss the idea of left to right > assignment operator. The draft rfc can be found here > https://github.com/vadimonus/php-rfc-pipeline-assignment/blob/main/rfc.md > , there is the part, that describes problem. The problem you're describing is not unique to pipes. Code like this is quite common. $x =3D foo() ->bar() ->baz(); If we decide this is a problem (which I fundamentally disagree with), then we should try to find a general solution, rather than something that is specific to pipes. There's no reason why this example shouldn't work. foo() ->bar() ->baz() |>=3D $x; At that point, you should probably also look for an operator that isn't pipe-specific. But again, I disagree with the premise that this is a problem to begin with. > The current bahavior of pipe operator when used with variable is wery poo= rly described in RFC That's not quite accurate. It states: > The left-hand side of the pipe may be any value or expression. And according to PHPs expression model, variables get no special treatment. They are evaluated and the result is used accordingly, pipes are not special at all in that regard. Cheers Ilija