Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123432 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 D69F01A009C for ; Mon, 27 May 2024 01:31:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1716773560; bh=VAlH6nq/YLd4W4GKYqGBryzH+70ZgFmpNfmBUZwAJDQ=; h=References:In-Reply-To:From:Date:Subject:To:From; b=ZiOcKeT52ijIcAXjjn7j0Dgu3aB+Ax3Jq59khB2p23Mpldo1SmH7HEcJgSbvv/WvB UPhAAJuObl3fpw6BYq3OW/kHnPqjtwp1GCl3/sis1pUQnhct9KLaeFgzd/Rj/UtmDC 4z7ElNudsBMWl/gfjqgU3BcHGu4nAj8qWyk8h8TBykQA7IDPlPlYew0o+qS5csRGot O0tq6L9k3gO9XXl5lktsGJxAcVugcwYKsb1WDDC3Sa9b244r7+Cj2CaN5rveXypwE5 Zk2FSuhI+T7NzYbywd1aI3PwH1YwYvLyA0MIOOIbkcrKHgFBVvBrZp+MMjQkRY6Z2E Dx2Sv+N9pQsvA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9CFDD18005C for ; Mon, 27 May 2024 01:32:39 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,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-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) (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, 27 May 2024 01:32:39 +0000 (UTC) Received: by mail-qv1-f52.google.com with SMTP id 6a1803df08f44-6ad8243dba8so2306786d6.3 for ; Sun, 26 May 2024 18:31:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716773499; x=1717378299; darn=lists.php.net; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=VAlH6nq/YLd4W4GKYqGBryzH+70ZgFmpNfmBUZwAJDQ=; b=VBtp2LA5zfaBUMvPfWDgOg/99LxE1SVxTtJYmm8o2yoYISLUQIT1+fq6JBeEpMi4k/ oH3hbTufWRWqyPusDTiPefcPsZEmgkUIY0s3sXnU29NkB9n36yucv06mowV4qwC59q2e Ly0mXBsA1M+8bPiaNT04JELEevwfkqBWLrPwd3V2/4ViX7ny0Dhaf0FiMjDFORAIJ//B ez885wto8etTLxE5U6QwmOXf76XTys6S1jKNSbBjxQwZ0Vz0SecXvsm3gcepTP3p756d vUJ2z+7RBcZKgO1WljWuWQDtjtvVYmIs51UkAFdk8s9tUdJuMuH6Jlm03a43ucbCUTys aiBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716773499; x=1717378299; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VAlH6nq/YLd4W4GKYqGBryzH+70ZgFmpNfmBUZwAJDQ=; b=Hbet5Ud6h34GOVc1yc04AsflPaabG8S39eXfIhFCE9v0VBFwp1bkQJFowb/t5Q1iQp vB1HBc46xWacVx+HYt1Hw3VYyKAIF/oYGUm6Bdy+fjjHykECNcV60RCF0/RabdPkALYT gpFPxGOIFD11iAxraPAMAdlbi4TBhN2aVM8oWvu9rl25Z/ybLt3Z5l9+Q/4CePTBRYUR 7xp6TJUK3zSKXnZfBu7l6Ae7NDaONLHzoREueLuQi5N8JR6W/Zab21kMVUN1Qi+AR9gR IcJXoCx+iz7qYasNK0Nn8y/jie90F/yVo2sw9hA0HYDicZZecYhsTG58N+C9VKKLLFVS j4gw== X-Gm-Message-State: AOJu0YzEoMyRrR8KzCZfIfQhfNTzI15/y6o3LHaimAPY0JsAjj61hH1M xs7hxCxDi10g0cnASrPTxu1n0XfZQMwN1jOu4Ja46exv6xd+CQK6ar2uaO8rCMCVWP7SlcqdroP ZpCcUPt5a9G4ySjywCzUrY5Mk3uO7u8ZGfLQ= X-Google-Smtp-Source: AGHT+IEl+JgEGKhjr6h6BXDJ+fBbRc0TIFwx+zdC1DX/lJBp6ncnvDbl5rLB6yOUeH1Y/G7Dc9YZ1jcM8wtCfeLOWUg= X-Received: by 2002:a05:6214:1186:b0:6ad:78f2:fce8 with SMTP id 6a1803df08f44-6ad78f2fe9emr26129606d6.54.1716773499268; Sun, 26 May 2024 18:31:39 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 27 May 2024 03:31:28 +0200 Message-ID: Subject: Re: [PHP-DEV] [RFC] Transform exit() from a language construct into a standard function To: PHP internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: tovilo.ilija@gmail.com (Ilija Tovilo) Hi Gina On Sun, May 26, 2024 at 11:47=E2=80=AFPM Gina P. Banyard wrote: > > On Wednesday, 8 May 2024 at 14:40, Gina P. Banyard wr= ote: > > > > > I would like to formally propose my idea for exit() as a function broug= ht up to the list on 2024-02-24 [1] with the following RFC: > > https://wiki.php.net/rfc/exit-as-function > > As there haven't been any comments for nearly two weeks, I'm planning on = opening the vote for the RFC on Tuesday. 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. 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. 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). Ilija