Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124783 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 qa.php.net (Postfix) with ESMTPS id B17D71A00B7 for ; Mon, 5 Aug 2024 17:30:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1722879142; bh=zyU0219KayOjAs1DHJOn3XrHT4SrttQFe92TrXelbpg=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=OW+oDq7GKTW6cqz6ZhgFzv70VdFbEdOUpPjXuEROoYgm3fWMQf+RhgyUGiSVOMR8u ytScX0I7cm5ru6DCc+bpIw4FxIFxuv9mDjDX/CllsLQ9KbhLGUpJcBcGlbtmPZc8FM vQuEjuyHj5ZzSZ84WUzXPegwOufY/6lPzwW5c3FeRLiZIHsPV4d8D4iNyPlZmHmnlG qaNjaGKXI/4atY/guK83HpxvRdLh+WzYP4aN9nHEBT5RQQS0PGmlb7C3WEPHH4qmIQ fO43Q4dlyskM5DObLYxbMxjeWwX0D2UcmNLrUkf0Y0UD91zwvEywZUeHtStRyrZXD3 NYeosZRsxl7kA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CFC2E18006D; Mon, 5 Aug 2024 17:32:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (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; Mon, 5 Aug 2024 17:32:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1722879032; x=1723483832; i=cmbecker69@gmx.de; bh=Vu8MpPDKFPHaEGDld0HaptAv3slpKbEZMTS5Rtxn2zs=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=oDzmSx+Ya/aa5WQ46IrAc5Bo6k39tSVFUif2brBo/Ys/PZp4SNpzPcU/5SZp8jtD WT/PTJXIKpkGJdN0ABHQ8vn1ZaEI3tjcqmKsDyUnH9fsAIpTSQ/C3/KblRN9Sj8+9 h0DfO61hhfAllTGYl/zizYd2Ao2b8tXecb5nE3ZzWcoqL032v3MDit2K9Lx9KtubS rdwupsq6pzNnSz7tENmWwV+uC8DRdpdWUlaG+HmkPQ5cNzJb9vl5EHpREH6wubAVM 7qeOAkBF7EQW+p63Bt+GSJxR0RjSYmYZ8IJuBr6lKK1lVgaZ2Pw9eJyot99CCnT/n vejraE2DBmMNrVYF/Q== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.2.130] ([79.251.205.37]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MSKu0-1sm7MW24Ua-00PQKy; Mon, 05 Aug 2024 19:30:32 +0200 Message-ID: Date: Mon, 5 Aug 2024 19:30:32 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] [RFC] [VOTE] Transform exit() from a languageconstructinto a standard function Content-Language: de-DE To: =?UTF-8?Q?Tim_D=C3=BCsterhus?= , Derick Rethans Cc: "Gina P. Banyard" , PHP internals References: <15bb76a0-cbd7-4145-b429-76d424755106@gmx.de> <1a8650d2-7eb5-d645-8132-e5522ad24637@php.net> <06ba1d82-6387-46ac-8be3-1d3472993e1a@gmx.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:6uFXeVLd1u5WffRKDlAeBpbPuvddKi9C37yN1uksDTg05ewUuN+ Y2bNoEfYYIPJYj3JFniAy9j5T7Ueeey2Azx5OobAaD8E0fkhWaen+Rqot0Z4HOWpN+wSlQq C+w62+gSnR1RKuYhQYNSjDOeRy9iWyc6PXIX9297V7mVHIIRYA9bpMsn0L4MUDa+iDYuaQ+ YSxqbkxIMXXCfCZ1eXHqQ== UI-OutboundReport: notjunk:1;M01:P0:fvQTBdRsOMk=;IgnIn4Lw9vXWey3f0FFRbHyJYXg XGW9E305A3g6Rho9+ZnT8PCOR3E2DZ9/d45aeYwEDrgBJS7Ty4nsSHMSuyB1dzptOoUbPR6r3 tO9v2MBr3HjUMrlx33gDj2z+XBIOPij7DZHogemMmT989R9lfOmFjrSgJIQexUxqq+hEKfMxK y1l27rr9vzbTc1TQegMc24pFQkx85p/YRk4U8moXbbwNne4c9gaKupRt3sRsLrPmvFyCwOtv4 61ESSbhrTYSakJZ2h07gJ/o+wzcbDiDyjHCQeiuj9cWFl8BGxiL2YMR5XwnQvdXVOCaVNsCGj Oxppzmm6Ip9uwmY3rx0sZrscCN1+8MtuzDbXOjPn/0C/RggQ7pmNQcPMF5hOwNkwLvhYYCdNJ HmkWIu8kRdENMKaL2mLpOxXngHSbKuL/EZAC8qS7BZY9IBg4SEfR0PW4P6b03MGeXsnyGgu0c C26hc8ATrVE6e0Q0OnlThidRlHyBaIV7wx/l5nqzqH6JMjGNW4XKcDaJ4kULWK9R1q1U8vLS6 iMIBAyGYVvw5aRwZ/JVlaxQI+rWJkPdQndkifWMxN0nGS/kjaeNbTHAlS4hoqKVS/fVwgSU/R Pcsx2SW8QbOZs3ETnYiywu3yTc1ufxS8ln7h1OjCIWfgWcExkYRC0QF7F5ZGTQDuf7utQgVUi sUKSSIg2RIUUguhkZO3IR348STT3rJ4qPnahxNzMQDCQErpwsPeR6ydHdoK+jl/l89qCC7TW3 W6GTLrNJGW5JWVNj1f/zAXiuJ7z74z8jjgjDCN3298HN8OAnX8e2HNnmbSQA94lhbVngb9L3U sxayO9V0fTz+NwXZtZtZHQow== From: cmbecker69@gmx.de ("Christoph M. Becker") On 05.08.2024 at 18:52, Tim D=C3=BCsterhus wrote: > On 8/5/24 14:52, Christoph M. Becker wrote: > >> Hmm, so far I only had skimmed the RFC and the related discussions, but >> now I checked out the suggested implementation[1].=C2=A0 Then I tried t= o >> build with PECL/uopz, and of course that failed because ZEND_EXIT is no >> longer there.=C2=A0 Okay, quickly drop that usage; build succeeds.=C2= =A0 Then I ran >> >> > uopz_set_return("exit", function () {echo "hello";}, true); >> exit; >> ?> >> >> And got >> >> hello >> >> Previously, no output was echoed.=C2=A0 While that seems to be fixable = in > > Frankly from a userland developer PoV this looks entirely correct: If I > override the `exit()` function, then I expect the `exit()` function to > be overridden. I should have clarified, that "fixing" means to restore the expected behavior of uopz, namely that accidential attempts to override exit with `uopz_set_return()` were silently ignored, but unless `uopz.exit=3D1` is set, or `uopz_allow_exit(true)` is called, exit is ignored. Especially the latter may be relied upon by tests for legacy code. Christoph