Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130052 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 9132F1A00BC for ; Sat, 7 Feb 2026 22:51:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1770504708; bh=i8R87tU7FXiqK8hl9nb7dh6+/3ircGZhsDtPz7LNpLA=; h=Date:Subject:To:References:From:In-Reply-To:From; b=XtIJ2IEeKWAl2XpCDJWqX2DJkRZlfrPu//cCIvMnJJ3dtx4+EEgUmX98hYobrJSLn Wwq7c2Qv79F/bgNZS9gg9lBtlzf8wq/x8ghidJmtqv33d5C5QSE3IzBdAaK7ptwtTP JmPlhoG+8OObe6bU8H8nOJWjW8F+HDTSkYQqkkiCih9Xv7uI6Zk0naWakxKv/giHBU z2P5wgXoL07fz8KmyvLrxSjL19p1n2Uwzf6Y5jQc3/P5/TaNynW/srgIRw7SQWEC9y zUMTQ4SmVStnQQWOVxGHUIUlnqIuOr6eI+zqIrDVm+LIzgTCPLyR2lY4n2SsgcNDWQ dOdF+n5HlYB1A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A1CEA180040 for ; Sat, 7 Feb 2026 22:51:45 +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.8 required=5.0 tests=BAYES_50,DMARC_MISSING, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from jessie.smtp.mailx.hosts.net.nz (jessie.smtp.mailx.hosts.net.nz [43.245.52.195]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 7 Feb 2026 22:51:44 +0000 (UTC) Received: from 122-57-27-239-adsl.sparkbb.co.nz ([122.57.27.239] helo=[192.168.1.67]) by jessie.smtp.mailx.hosts.net.nz with esmtpsa authed as varteg.nz (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim 4.96) (envelope-from ) id 1vor9H-002WRM-22 for internals@lists.php.net; Sun, 08 Feb 2026 11:51:31 +1300 Message-ID: Date: Sun, 8 Feb 2026 11:51:20 +1300 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] Return expression To: internals@lists.php.net References: Content-Language: en-GB In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Hosts-DKIM-Check: none From: Weedpacket@varteg.nz (Morgan) Sorry; thought I'd acknowledged this already. On 2026-02-03 05:00, Ilija Tovilo wrote: > > I encountered similar issues for block expressions, for which > { return; } is effectively equivalent to return. I explained the > problem in more detail here: > > https://wiki.php.net/rfc/match_blocks#technical_implications_of_control_statements > > Ilija Thank you for that. If abandoning a function mid-statement can leave things dangling then that's a big no-no. I suppose exceptions can get away with it because there's an opportunity to clean up danglers left by the (possibly multiple) abandoned functions if and when they're caught or while the stack's being unwound.