Re: [RFC] [VOTE] Transform exit() from a language construct into a standard function

From: Date: Mon, 05 Aug 2024 19:34:20 +0000
Subject: Re: [RFC] [VOTE] Transform exit() from a language construct into a standard function
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Monday, 5 August 2024 at 12:04, Derick Rethans <[email protected]> wrote:

> 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: @[email protected] @[email protected]

I still do not comprehend your issue.
You can either do stuff at compile time, which has been explained before, or use the function call
observer for anything runtime related.
The behaviour of exit() is completely observable with the current observer framework, so I
don't see why anything else needs to be done.


Best regards,

Gina P. Banyard


Thread (37 messages)

« previous php.internals (#124786) next »