Re: [RFC] [VOTE] Transform exit() from a language construct into a standard function
| From: | Derick Rethans | Date: | Mon, 05 Aug 2024 11:04:02 +0000 |
| Subject: | Re: [RFC] [VOTE] Transform exit() from a language construct into a standard function | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-124756@lists.php.net to get a copy of this message | ||
On Tue, 30 Jul 2024, Christoph M. Becker wrote:
> On 30.07.2024 at 11:49, Gina P. Banyard wrote:
>
> > I have just opened the vote for the "Transform exit() from a
> > language construct 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).
Xdebug uses exit for exactly that too. For control flow analysis. And I
also always have considered it to be a control flow instruction.
I see no benefit in changing it to a function, especially because
there will never be a function "exit" from it, just only an "entry".
This breaks function execution symmetry (and causes issues with Xdebug
when I last tried to make it work with a development branch for this
RFC).
As the RFC is scarce on mitigations for this, I am currently voting "no"
as I am unsure how certain features in Xdebug could remain working. I
have written to the list on other reasons before
(https://externals.io/message/123277#123450) without a conclusion.
I'll consider changing it to yes if there is a commitment for addressing
these feature-maintaining-requirements to keep Xdebug working, either
through new APIs (think observer) or other mitigations.
cheers,
Derick
--
https://derickrethans.nl | https://xdebug.org | https://dram.io
Author of Xdebug. Like it? Consider supporting me: https://xdebug.org/support
mastodon: @derickr@phpc.social @xdebug@phpc.social