Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124684 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 E26E31A00B7 for ; Tue, 30 Jul 2024 11:47:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1722340177; bh=QwDyl2X86DC8ZUQNXzS8ktHABT7qBvmsveYgrOgUDq4=; h=Date:Subject:To:References:From:In-Reply-To:From; b=nG9BNcTAubGiW3Abx+H0YrkhW0iU7XrZdRduh5nR8BdQkjpdlnUz5r29er3FYDS/3 EW3VLvrrSzv8qPO9FhFas8X+bVjRZHzYQN98lFBOpoVKSPeOMbL4HuSPWl6nzDvQAd gzwlOlzeP83/v9SNk6PIpzf8xRoQ7HzLLIRujegnsX/dpISoF3HaXjPFHupGcC+4Zb 3H563qFvM/Tjn4qjQ6sNcvUZVnPpf+8o57Rsl09d5N1lXKc38JWvG4DbpEXobJTieb GGnhpnbbTz+1+HRydol0xMMlZSj+pl0JgzplsrsKd0f4aE2hjHP4LuDtRw4Ibxj6Hz yJtklNRf5jnlQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8DABD180052 for ; Tue, 30 Jul 2024 11:49:36 +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, RCVD_IN_MSPIKE_H2,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.15.15]) (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 ; Tue, 30 Jul 2024 11:49:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1722340074; x=1722944874; i=cmbecker69@gmx.de; bh=En5T7XLAAc7nlQpXdfIVjows3nZAbat8HCslYc2rWD8=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To: 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=R5WvR10br+eBi6d/H+Kf7h/OcJ0Q905wIYVlWy7G66KM2dWDFnMtJ2cmrI2nPfdu JLI6NBLSmqovadGRXkOw+wfKe9+IkRfz2BV/Hc4s+1tlgpj21sjsTnReLWY+wwG/i 5BQdP2l/MPZ3ooX9z+r6QvmEZcVocl2jrBr+hwKbe4KTkJT3wZbvDTEry3aA96VmB zuIee4w1LMWoMz4I2UcFIlkP0jLGdrPfcV3Pmd6chTMsJktaLz9Qmo4qtjgRQtZsr UmZbWHq8bCPFc+cmiWzdP4AakQrm4wQr2fzLPvzoRS6ayf74bx+f1kyHV85ZbjxfJ rMHsZMIlfJ+TcYpAlg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.2.130] ([79.251.205.37]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N1wlv-1s6HB53B3R-015qOW; Tue, 30 Jul 2024 13:47:54 +0200 Message-ID: <15bb76a0-cbd7-4145-b429-76d424755106@gmx.de> Date: Tue, 30 Jul 2024 13:47:55 +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 language construct into a standard function Content-Language: de-DE To: "Gina P. Banyard" , PHP internals References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:ZWK+t3nYyHACRxHq4XwlzNOFfI+J+fLL3vEb+TgH/f4kFUtSpgY DI5HHaqr6DLgAF2T9VPsdXFTAI5/69SuQbJf1fuqFq6xoFGPJT7XieFp7CSPLxAs0PxC9ZR ylhUtet6n4XhIIJqhkRPWhu89bMVhtQXkUbsZe+oBLY++bFxPwI9BbWh+zIOZ8AbzFSGkbW ydD/M3g8CC5ljNnWxTgoQ== UI-OutboundReport: notjunk:1;M01:P0:0+TIf8Yh2ro=;3GHzx466jI7pU/fQIYvFWjdAG3h P3Vw0XVXjoxbWEvID0XQpNaQJRvqSNkLWgzzVCxV7SCmpN8iWke2c2mm/VAqwalAzI7INkGrv BnB5vlbYilyeHjxDb94sLsXz3iFTQHSmydBNAJh1twtfoVxlVbsVv5eqUloQZI0gY5qAE9121 SPVD1UaC1YRZqlXgLXThUI83mc5kkP1ZfM7ylyKeeHk1hVn7fJIu1LSKYXaLS4PcXBwIzwe4x SSQXnHRUdh/Nlz2uNvOM6DtZZDdvSMkyoqzOvwD+4iAHLeWunkOjVNAQUWnzWkXWNrS8ouNWG 4tBDnQ+h2412iFYXtQxqr7D7zcEtdSjnPgNS4RlMJfP8X2+v+RpbgpH7zmOM3sk7lBRky18Dh bp7mD+x+Pr0XrCwoqzsl4zCEnmdybmEwyfEA1zFQSOAIuqjEBzmKrgw4BSguEEipD7fZhdCU9 OEGfdVjVUtm9oZ+KbztLCHvOCwVFcnlRVgr3vEWPgdK+NdDrNpkF/FqEL1eMOcp8DFGJlTJZ7 mS6ZBO530HNA00ObLEVkLFBV+uIpCy/GoxtZBUnpUWNOUMfDErqRvR8HW3vqwHvMr+QByaP3o tPqprmtYpD0mWGMQ0vgktVKsGlD+xNrMp4V0BOUlgYx3nsURJYQpwS2D7MZw9rtKEfkYUVz4r rEthESz9yZ4RAeuzjhKrxdPlEZ/+a/DfaN8PEDSIkALE8OTBu90W53E+IyoIPhUxslPxyjuFW OwHgPwoXpBXr7oUPv6qSQVNKt2kP4JcSf+nkzYLq2ahZJeQ5PnH0+n0ZjUGmM0Zi/HsKPCWxe /GXmuHZNBFKx8wTM+rKanpfg== From: cmbecker69@gmx.de ("Christoph M. Becker") Hi Gina! On 30.07.2024 at 11:49, Gina P. Banyard wrote: > I have just opened the vote for the "Transform exit() from a language co= nstruct into a standard function" RFC: > https://wiki.php.net/rfc/exit-as-function > > The vote will last for two weeks until the 13th of August 2024. As userland PHP developer, I always regarded `exit` as a control flow instruction (quite similar to `break`), and as such I'm not really in favor of converting it to a proper function (especially since it is not, because the parantheses could be omitted). Would that RFC imply that I would need to write `\exit` or have a `use exit` clause to avoid dynamic namespace lookup? If so, I would be even less in favor of that change. I do understand your point about the type juggling semantics, but I might have addressed that differently. I almost always use `exit` without argument (and if, only with an int), and `die` always with a string (and only for quick experiments), and I figure that this might be what most contemporary code does (at least, I hope that the `do_something() or die()` times have long gone). As such, having `exit` and `die` as alias could be changed, sticking with `exit` as a control flow instruction, and having `die` as proper function (which could even be implemented in userland), where exit would allow an optional int argument (like `break`), and die() a required string argument. Of course, this would be a much bigger BC break, but it seems to me the cleaner solution. Cheers, Christoph