Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123446 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 881411A009C for ; Tue, 28 May 2024 12:10:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1716898297; bh=HChwQha0LjEiYYTgWl/tUfXK1oJ/k1ERy3Qv6OdAghs=; h=Date:To:From:Cc:Subject:In-Reply-To:References:From; b=beRn645s9x8TEa496BNKYdO27LoCIA1oVi3/OPcjyCZpwHKrnDnHU6uvvNyNWIh5c F5pApZMxXxCzJ47HY88FWJh2IuVX4/XT95Sg9b9odTKA6m5rBEw2yq9CUElhxO2jvt 93tndCUgYdL+RY3tk/4UhYYLqYLUs34cw9VGaFC1/Z/gegjDRlEvz+d4K8uAh/mMEn mDbRpn/bcfzSyFSioaRDCbmHPs6Xbio+vCS0dpeCkAoB9NFNLjY/2ReA3WMd9b7/PZ w9EDJjrARtxPQfpaZCJvONCCO3QwCLcVHvLql5OXhLz2qJBh+gMvKJWJzWcnYsK/84 tpyheBkidNjsg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 19353180650 for ; Tue, 28 May 2024 12:11:37 +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_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-4317.proton.ch (mail-4317.proton.ch [185.70.43.17]) (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 ; Tue, 28 May 2024 12:11:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gpb.moe; s=protonmail; t=1716898235; x=1717157435; bh=HChwQha0LjEiYYTgWl/tUfXK1oJ/k1ERy3Qv6OdAghs=; 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=Jv+iZXd+kUTLmgygFEmFqRYS6bY09c/c+wOICXBEG9bV2i4mHi5WgLu8PG3lSjcOC wSpOh77D2Q+BcxMi+N1xmmsNJyWAtvgS+ajjMlIbTjjYnH4+PcwJWokk18FlGNX8Bd V9gq1FDg9YMfcixjIlJhMO3zM6TIQ8IFI0FmWQIhkpvwbRVY5gjx+vKjGos/v6S0sj UjQ8ltnWKKk2fMXB4RW/i+wcCKKetRcvh/eEOrHvTlOE9bUXdxhEH+9DDeaWsfjRWa 8Mz1MdtuEPUh8cDS63fy6kktSyrVNWTePU2vZPFcd4Ife+xRDL6R5WPocnerK3Lnlm E6W7LzWEKeSUQ== Date: Tue, 28 May 2024 12:10:32 +0000 To: Ilija Tovilo Cc: PHP internals Subject: Re: [PHP-DEV] [RFC] Transform exit() from a language construct into a standard function Message-ID: In-Reply-To: References: Feedback-ID: 96993444:user:proton X-Pm-Message-ID: 2fd045e8d53f66b87a9e7a860849fea9ed1f1c28 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net 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, 27 May 2024 at 02:31, Ilija Tovilo wrot= e: > Hi Gina >=20 > On Sun, May 26, 2024 at 11:47=E2=80=AFPM Gina P. Banyard internals@gpb.mo= e wrote: >=20 > > On Wednesday, 8 May 2024 at 14:40, Gina P. Banyard internals@gpb.moe wr= ote: > >=20 > > > I would like to formally propose my idea for exit() as a function bro= ught up to the list on 2024-02-24 [1] with the following RFC: > > > https://wiki.php.net/rfc/exit-as-function > >=20 > > As there haven't been any comments for nearly two weeks, I'm planning o= n opening the vote for the RFC on Tuesday. >=20 >=20 > As mentioned early on in private, I don't see a convincing reason to > remove tokenizer/parser support for exit/die. I'd rather see this > handled in the parser directly, by converting the standalone keywords > to function calls. This avoids any backwards incompatibility, and > avoids special handling in zend_compile_const. I must be honest, I don't really understand how parsers work, so I went wit= h what I could understand and implement. But I'm struggling to see a reason for keeping the token in the first place= , and what issues hooking into zend_compile_const() has. >=20 > Another thing that's probably not too important: The PR likely breaks > dead code elimination for exit() and die(). This could be re-added by > checking for the never return type instead. Checking for a never return type seems more robust if it wasn't already sup= ported by DCE. I will see if I can do this. > You'd also need to > special-case the lookup of exit/die in namespaced code, where it will > always refer to the global function (as they cannot be declared in > userland). This is a pre-existing issue with assert() too then, I am happy to fix this= at the same time if the RFC passes. Best regards, Gina P. Banyard