Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130056 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 D99A41A00BC for ; Sun, 8 Feb 2026 14:46:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1770562015; bh=2sM/1Px9dLEql4EKxCdPFtzGZGlo9L8ksc/tb2wdqV4=; h=Date:Subject:To:References:From:In-Reply-To:From; b=QtGqJTHX2STs5USsPsDgy6bbNW+i4zh8N8hnGJve8UKeFm2/14h4A/9KRyCKSoDX4 bw3Ydq3d82gUZ1fQRkPB2uwkg+JCUFHb2U3QOXTu6tYOVZ3T+8sDvv8lPmSaiTbAxy dB+M/2+Et3NmyOxwU/MU/arPGyrO36qZMgk3eS/pCCLWoIwYeUiTqHdsP6cRl+WYMf lzLHDJ1CDOTF8Y5EXsiR4cRm9JRJXKhPPD43gAx2XN7iQYFgNG2HeAp+37Cp+MLqen ln9vvSLiASUETdAK+TshzvYRnkxwItTcBjAkieKiqtM/9MKc9zXIABWkFj+V0a7SfA 4qWdzu8H8LopA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B83091801E7 for ; Sun, 8 Feb 2026 14:46:53 +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,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-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.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, 8 Feb 2026 14:46:42 +0000 (UTC) Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-59de6abf324so2939806e87.3 for ; Sun, 08 Feb 2026 06:46:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770561996; x=1771166796; darn=lists.php.net; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=5uVDKZpStOfQGQ4X50C5tLpUmVBHa7TDkgZW9flrkBA=; b=GoqVVJruDOeharo6mKXYdf3AA45e2zPg1WmFg29/2Gc2OfOZ7GuI8gxUrFGX7rXOKC TVcvznQCaDbi0vvRl2Hm+zHnqQDldC9tKBeRjEQMg3CgGZ4Yp4NoXImAKu5GHTcgeel3 ZwP00xlKQ8qUIPhXDv3SZXz2EPBMeMfdfwq0eoMOO1ylloVl0f2MvmJ64PxVmEI5DfCE laiN3frM7hk+N9Ivxw0+7IoryRzHUGVVHcRN3OQkA5CT3T92CyaC9dZlKVE7iPcnRBII VOuaaM1TIbcBbHkaFCM56+GFte+n7xzh/ALtaL+pSbkvyBwswQwy02RJRLIhQe+ePDos uZfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770561996; x=1771166796; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5uVDKZpStOfQGQ4X50C5tLpUmVBHa7TDkgZW9flrkBA=; b=s4XMyzSpxlEaMW3KHh6u0mFwJlNwOL5GVNh066crM9ym/AGGgxPdnA8q4cPmnAdcJd lPM0b8uJcJGHF3ICi33Noq6nfiOCW7x/xSEXAB5RYo08VSGVAVj+TjvTgU0cUQy8KJlL wyAFKHO1PuzmH9rHO1nHfW0/rZI5CqLwqe7IgglDs4DMx6NDlloggA90vsgYSF1/IOvy Kdx6hsz4WmApIntwav/WnoS84QsUw+GtI5FR2aSUkkgJIOUut0hKqsZWICv0pyJmxWV2 af64Z8xoWAqwj1Ut11mMGmgRe6KdULjv5aWfrzKuIEkP2+JEkZTMOrL4K0O3ltI54I6P EYeg== X-Forwarded-Encrypted: i=1; AJvYcCWVYx3V0s2PX6xsNseV7AxTWrCzTzuukJo5xzUgyOnk51pcoEACPqDPA/pAJ6y2Vhe6Ds8KvpIDtxY=@lists.php.net X-Gm-Message-State: AOJu0YwKS8xtjVbdjanVACf6rDHx0dlmWMrzd7y8jNEO0cj70iJNWu+5 UouDJtIXmdqEEFH1d+NjFRQvlPohZFFqivGAv/xclQBiCq350yJ1XlVM X-Gm-Gg: AZuq6aLol6TprRAgj28wIwbBuHD30vqesOyWTQWjztln7w3O/JUjRvNwt+bwrsos/fY 2an1eN9eXAuwcHX8k38ZMp5JOkTkArVoFqMr7xB9REVHseMuHUIv8joVIdFy9ljAj4QeQDfai8B tWzUgHF7PePGHLBQvU2Z+BfWL0db6ooPtYIPzi7ErAaTXvraENNh2GQAKct7eaOIeUu4bQjyH0g zoSxXm7XJxDr6uXgi3/G70ORtLPrteNuZs1kUl38OkEkJcqad6PNwJjxCiznZTJ2PIJ6tBUjemD TkjyOeWl5pl6yzQZP6etnsoCqdZvbWDIRdhS+XK8ymJPKdo5ICQ4jeE1L5iYqhBNTCdssvauAOj wASQkcEvGchAa+vk3WKfBa41soXBrCtui5f9FjRfUDbNupNnm/iKHsplUN224DhMil5vc5Cftxi lEIpgxvVpU8u0bZev+PmcHCus= X-Received: by 2002:a05:6512:ace:b0:59e:13e5:a299 with SMTP id 2adb3069b0e04-59e45149ed3mr3100450e87.22.1770561995501; Sun, 08 Feb 2026 06:46:35 -0800 (PST) Received: from [192.168.1.16] ([46.181.226.137]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-59e44d299ffsm1989264e87.55.2026.02.08.06.46.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 08 Feb 2026 06:46:35 -0800 (PST) Content-Type: multipart/alternative; boundary="------------C0YBaONSu0T01eKPUVML1YW1" Message-ID: <13704e05-8385-424e-bd7b-6ab876cc68c8@gmail.com> Date: Sun, 8 Feb 2026 21:46:33 +0700 Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] [RFC] Pipe to return To: Oleksii Bulba , internals@lists.php.net References: <53c17181-caa4-41a3-b4ab-93069e6bb47b@gmail.com> Content-Language: en-US In-Reply-To: From: vadim.dvorovenko@gmail.com (Vadim Dvorovenko) This is a multi-part message in MIME format. --------------C0YBaONSu0T01eKPUVML1YW1 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 04.02.2026 15:16, Oleksii Bulba пишет: > > 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 > This would lead to parse-time time error, `return |> ` is not valid grammar sequence. --------------C0YBaONSu0T01eKPUVML1YW1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
04.02.2026 15:16, Oleksii Bulba пишет:

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

This would lead to parse-time time error, `return |> ` is not valid grammar sequence. --------------C0YBaONSu0T01eKPUVML1YW1--