Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124788 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 0C15E1A0132 for ; Mon, 5 Aug 2024 19:38:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1722886783; bh=DOoUD7jZvbOBss1NlZTDO3AaMSpEbGJ+TqwTM9Sh8HE=; h=Date:To:From:Cc:Subject:In-Reply-To:References:From; b=RgTojgAo36zktXlkrSX11+6jsnsQzTrRu+gmdrOcatXs5brdOP04/nyrrlYOFUtq3 ytZMs+yQ1kv0Xq5vw9+l+2yFSk/UKA1MSq1C8m8YFOVjZGrPhKK06dOjtvVZy81T9m 3/7JQ+wwIWbJlaHgOxeFFN7O6BRWnuHHkmewnTSouyURb+WOCEz3+5UyZBVfXSt5PZ X0rxAJbz6EPuH/UwzZJeWXLZkLaFobCXhx5K0XdaRmcb8Hn39D1fgTUSKYr3Gw/b6U YbzMSthd3U88iRgf7lSUfhhZZRkFuanAtfKb6aCvJNdPzueN9vEeHFkxV8ueU+tyy0 4zM3y3dFbSnzg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EABC41801FD for ; Mon, 5 Aug 2024 19:39:41 +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.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-40136.proton.ch (mail-40136.proton.ch [185.70.40.136]) (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 ; Mon, 5 Aug 2024 19:39:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gpb.moe; s=protonmail2; t=1722886677; x=1723145877; bh=DOoUD7jZvbOBss1NlZTDO3AaMSpEbGJ+TqwTM9Sh8HE=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=GtY66jFhvglwvcQ8Yd1d1vlhMSkljHUxSY+WoDNVmVdzuhwraYGq27K1aqjOQoOP0 4U9URpRNLrGlcHh/44Oo7CmIZSkXsq/47u+ottXmQcFy6v1XYgVERQXV5pfxomVgbw bd7niveiztMvLCo4ykvMJ4HZkhi9HqxlVBnd35zkR4jj6JgSLM53O/rcSKVZoAfMB/ Xpol1D/bbYOnO4FzydP5bh6WG6BmZK/NhSgzFDvAspCB5JhQGTNy916oYnhe7blh41 Rr9WkfDv1UAxYy9V47o+galqtXsh0S+ioTVzF4tRKNbVwfLgWw53XHgYYKFfxh09DX kCCKhGBpvfPsw== Date: Mon, 05 Aug 2024 19:37:51 +0000 To: "Christoph M. Becker" Cc: =?utf-8?Q?Tim_D=C3=BCsterhus?= , Derick Rethans , PHP internals Subject: Re: [PHP-DEV] [RFC] [VOTE] Transform exit() from a languageconstructinto a standard function Message-ID: In-Reply-To: References: <15bb76a0-cbd7-4145-b429-76d424755106@gmx.de> <1a8650d2-7eb5-d645-8132-e5522ad24637@php.net> <06ba1d82-6387-46ac-8be3-1d3472993e1a@gmx.de> Feedback-ID: 96993444:user:proton X-Pm-Message-ID: 6a4b5afe79bd4dbfafd23ed2bbf199c31f6db03d Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: internals@gpb.moe ("Gina P. Banyard") On Monday, 5 August 2024 at 18:30, Christoph M. Becker = wrote: > On 05.08.2024 at 18:52, Tim D=C3=BCsterhus wrote: >=20 > > On 8/5/24 14:52, Christoph M. Becker wrote: > >=20 > > > Hmm, so far I only had skimmed the RFC and the related discussions, b= ut > > > now I checked out the suggested implementation[1]. Then I tried to > > > build with PECL/uopz, and of course that failed because ZEND_EXIT is = no > > > longer there. Okay, quickly drop that usage; build succeeds. Then I r= an > > >=20 > > > > > uopz_set_return("exit", function () {echo "hello";}, true); > > > exit; > > > ?> > > >=20 > > > And got > > >=20 > > > hello > > >=20 > > > Previously, no output was echoed. While that seems to be fixable in > >=20 > > 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. >=20 >=20 > 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. >=20 > Christoph This sounds like a uopz extension issue that is easily fixed. I am not sure why we should bend over backwards for extensions that allow t= o break usual userland semantics while preventing userland behaviour to be = better. Best regards, Gina P. Banyard