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

2024-06-03 Thread Tim Düsterhus
Hi On 5/29/24 20:05, Derick Rethans wrote: For each op_array, Xdebug tries to figure out every possible path by following jumps. Certain opcodes, such as GENERATOR_RETURN, THROW, RETURN, and EXIT [1] are considered as an exit point out of the function. A path ends there. You linked to a

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

2024-05-29 Thread Derick Rethans
On Tue, 28 May 2024, Tim Düsterhus wrote: > On 5/28/24 16:26, Derick Rethans wrote: > > > I have just checked this for Xdebug, and you're definitely right > > with that. With the removal of the ZEND_EXIT opcode, it can not now > > detect a scope/function exit now. > > Can you clarify why

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

2024-05-28 Thread Tim Düsterhus
Hi On 5/28/24 16:26, Derick Rethans wrote: I have just checked this for Xdebug, and you're definitely right with that. With the removal of the ZEND_EXIT opcode, it can not now detect a scope/function exit now. Can you clarify why ZEND_EXIT is special for Xdebug when compared to any other

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

2024-05-28 Thread Derick Rethans
On Tue, 28 May 2024, Gina P. Banyard wrote: > On Tuesday, 28 May 2024 at 15:26, Derick Rethans wrote: > > > On Mon, 27 May 2024, Ilija Tovilo wrote: > > > > > On Sun, May 26, 2024 at 11:47 PM Gina P. Banyard intern...@gpb.moe > > > wrote: > > > > > > > On Wednesday, 8 May 2024 at 14:40, Gina

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

2024-05-28 Thread Gina P. Banyard
On Tuesday, 28 May 2024 at 15:26, Derick Rethans wrote: > On Mon, 27 May 2024, Ilija Tovilo wrote: > > > On Sun, May 26, 2024 at 11:47 PM Gina P. Banyard intern...@gpb.moe > > wrote: > > > > > On Wednesday, 8 May 2024 at 14:40, Gina P. Banyard > > > intern...@gpb.moe wrote: > > > > > > > I

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

2024-05-28 Thread Derick Rethans
On Mon, 27 May 2024, Ilija Tovilo wrote: > On Sun, May 26, 2024 at 11:47 PM Gina P. Banyard > wrote: > > > > On Wednesday, 8 May 2024 at 14:40, Gina P. Banyard > > wrote: > > > > > I would like to formally propose my idea for exit() as a function > > > brought up to the list on 2024-02-24

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

2024-05-28 Thread Ilija Tovilo
On Tue, May 28, 2024 at 2:10 PM Gina P. Banyard wrote: > > On Monday, 27 May 2024 at 02:31, Ilija Tovilo wrote: > > > > On Wednesday, 8 May 2024 at 14:40, Gina P. Banyard intern...@gpb.moe > > > wrote: > > > > > > > I would like to formally propose my idea for exit() as a function > > > >

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

2024-05-28 Thread Gina P. Banyard
On Monday, 27 May 2024 at 02:31, Ilija Tovilo wrote: > Hi Gina > > On Sun, May 26, 2024 at 11:47 PM Gina P. Banyard intern...@gpb.moe wrote: > > > On Wednesday, 8 May 2024 at 14:40, Gina P. Banyard intern...@gpb.moe wrote: > > > > > I would like to formally propose my idea for exit() as a

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

2024-05-28 Thread Gina P. Banyard
On Monday, 27 May 2024 at 19:10, Claude Pache wrote: > Hi Gina, > > It is ok, for `exit` to be wired to a function. However, the paren-less > `exit` syntax is absolutely reasonable and should be kept in the long term > (more on this below). It is true that your proposal doesn’t remove the >

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

2024-05-28 Thread Gina P. Banyard
On Tuesday, 28 May 2024 at 07:53, Daikaras wrote: > > I feel like the reasoning in this RFC is misguided. `exit` behavior is > not consistent with functions because it is not a function. But it is > consistent with constructs like `echo`. Or am I wrong? I'm all for > stricter typing but not at a

Re: [PHP-DEV] [RFC] Transform exit() from a language construct into a standard function PHP internals

2024-05-28 Thread Daikaras
On 2024.05.08 16:40, Gina P. Banyard wrote: Hello Internals, I would like to formally propose my idea for exit() as a function brought up to the list on 2024-02-24 [1] with the following RFC: https://wiki.php.net/rfc/exit-as-function There have been some slight tweaks to the implementation,

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

2024-05-26 Thread Ilija Tovilo
Hi Gina On Sun, May 26, 2024 at 11:47 PM Gina P. Banyard wrote: > > On Wednesday, 8 May 2024 at 14:40, Gina P. Banyard wrote: > > > > > I would like to formally propose my idea for exit() as a function brought > > up to the list on 2024-02-24 [1] with the following RFC: > >

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

2024-05-26 Thread Gina P. Banyard
On Tuesday, 14 May 2024 at 17:24, Juliette Reinders Folmer wrote: > On 11-5-2024 16:43, Gina P. Banyard wrote: > >> On Thursday, 9 May 2024 at 15:17, Jorg Sowa >> [](mailto:jorg.s...@gmail.com) wrote: >> I don't think there are any other "functions" like this. >>> What about list(),

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

2024-05-14 Thread Juliette Reinders Folmer
On 11-5-2024 16:43, Gina P. Banyard wrote: On Thursday, 9 May 2024 at 15:17, Jorg Sowa wrote: > I don't think there are any other "functions" like this. What about list(), isset(), print(), echo(), require(), include(), unset(), empty()? We use them the same way as functions, but those are

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

2024-05-11 Thread Rowan Tommins [IMSoP]
On 11 May 2024 15:43:19 BST, "Gina P. Banyard" wrote: >print, echo, include(_once) and require(_once) do not mandate their "argument" >to be passed within parenthethis, so making them functions does not simplify >the lexer/parser nor removes them as keywords. It's actually a much stronger

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

2024-05-11 Thread Gina P. Banyard
On Thursday, 9 May 2024 at 16:18, Saki Takamachi wrote: > Hi Gina, > > > Hello Internals, > > > > I would like to formally propose my idea for exit() as a function brought > > up to the list on 2024-02-24 [1] with the following RFC: > > https://wiki.php.net/rfc/exit-as-function > > > > There

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

2024-05-11 Thread Gina P. Banyard
On Thursday, 9 May 2024 at 15:17, Jorg Sowa wrote: >> I don't think there are any other "functions" like this. > What about list(), isset(), print(), echo(), require(), include(), unset(), > empty()? We use them the same way as functions, but those are not real > functions. > Kind regards, >

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

2024-05-11 Thread Gina P. Banyard
On Saturday, 11 May 2024 at 09:05, Juliette Reinders Folmer wrote: > On 8-5-2024 15:40, Gina P. Banyard wrote: > >> I would like to formally propose my idea for exit() as a function brought up >> to the list on 2024-02-24 [1] with the following RFC: >> https://wiki.php.net/rfc/exit-as-function

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

2024-05-11 Thread Juliette Reinders Folmer
On 8-5-2024 15:40, Gina P. Banyard wrote: I would like to formally propose my idea for exit() as a function brought up to the list on 2024-02-24 [1] with the following RFC: https://wiki.php.net/rfc/exit-as-function There have been some slight tweaks to the implementation, namely that the

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

2024-05-10 Thread Saki Takamachi
Hi Tim, > This is already the case. `exit` throws an internal uncatchable Exception. > Quoting from the RFC: Thanks, I had overlooked that. I have no other concerns. Regards, Saki

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

2024-05-10 Thread Tim Düsterhus
Hi On 5/9/24 17:18, Saki Takamachi wrote: Is it nonsense to always stop processing even if an error occurs? Or, how about creating an uncatchable exception class specifically for exits? Or is this level of risk negligible? This is already the case. `exit` throws an internal uncatchable

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

2024-05-10 Thread Tim Düsterhus
Hi On 5/9/24 16:27, Larry Garfield wrote: I support this. My only question (which applies to current exit() as well), is what the exit code is when you pass a string as the parameter. That's not clear from the exit() docs currently, but the RFC made me wonder. (This may be just a doc fix

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

2024-05-10 Thread Tim Düsterhus
Hi On 5/9/24 16:17, Jorg Sowa wrote: I don't think there are any other "functions" like this. What about list(), isset(), print(), echo(), require(), include(), unset(), empty()? We use them the same way as functions, but those are not real functions. All of them require to be followed by

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

2024-05-09 Thread Saki Takamachi
Hi Gina, > Hello Internals, > > I would like to formally propose my idea for exit() as a function brought up > to the list on 2024-02-24 [1] with the following RFC: > https://wiki.php.net/rfc/exit-as-function > > There have been some slight tweaks to the implementation, namely that the >

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

2024-05-09 Thread Larry Garfield
On Wed, May 8, 2024, at 1:40 PM, Gina P. Banyard wrote: > Hello Internals, > > I would like to formally propose my idea for exit() as a function > brought up to the list on 2024-02-24 [1] with the following RFC: > https://wiki.php.net/rfc/exit-as-function > > There have been some slight tweaks to

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

2024-05-09 Thread Jorg Sowa
> I don't think there are any other "functions" like this. What about list(), isset(), print(), echo(), require(), include(), unset(), empty()? We use them the same way as functions, but those are not real functions. Kind regards, Jorg

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

2024-05-09 Thread Derick Rethans
On Thu, 9 May 2024, Flávio Heleno wrote: > On Thu, May 9, 2024 at 7:51 AM Niels Dossche > wrote: > > > On 08/05/2024 15:40, Gina P. Banyard wrote: > > > Hello Internals, > > > > > > I would like to formally propose my idea for exit() as a function > > > brought up to the list on 2024-02-24 [1]

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

2024-05-09 Thread Flávio Heleno
On Thu, May 9, 2024 at 7:51 AM Niels Dossche wrote: > On 08/05/2024 15:40, Gina P. Banyard wrote: > > Hello Internals, > > > > I would like to formally propose my idea for exit() as a function > brought up to the list on 2024-02-24 [1] with the following RFC: > >

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

2024-05-09 Thread Niels Dossche
On 08/05/2024 15:40, Gina P. Banyard wrote: > Hello Internals, > > I would like to formally propose my idea for exit() as a function brought up > to the list on 2024-02-24 [1] with the following RFC: > https://wiki.php.net/rfc/exit-as-function > > There have been some slight tweaks to the

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

2024-05-08 Thread Tim Düsterhus
Hi On 5/8/24 15:40, Gina P. Banyard wrote: Let me know what you think. The fewer not-actually-a-function functions, the better. I don't have any remarks and I'm in favor. Best regards Tim Düsterhus