Re: [PHP-DEV] [Pre-RFC] Convert exit (and die) from language constructs to functions

2024-02-23 Thread Juliette Reinders Folmer
On 24-2-2024 3:47, Gina P. Banyard wrote: On Saturday, 24 February 2024 at 01:57, Juliette Reinders Folmer wrote: Hi Gina, I'm not sure a pet-peeve is a good motivation for creating an (I expect large) breaking change. The upgrade path, I suppose, would be updating calls to `die`/`ex

Re: [PHP-DEV] [Pre-RFC] Convert exit (and die) from language constructs to functions

2024-02-23 Thread Gina P. Banyard
On Saturday, 24 February 2024 at 01:57, Juliette Reinders Folmer wrote: > Hi Gina, > > I'm not sure a pet-peeve is a good motivation for creating an (I expect > large) breaking change. > > The upgrade path, I suppose, would be updating calls to `die`/`exit` to > always have parentheses ? Or al

Re: [PHP-DEV] [Pre-RFC] Convert exit (and die) from language constructs to functions

2024-02-23 Thread Juliette Reinders Folmer
On 24-2-2024 2:37, Gina P. Banyard wrote: Hello internals, I've been having this mild annoyance with exit()/die() since I wrote a CLI script using a boolean $hasErrors variable to know if the script failed or not and to indicate if the script failed via a non-zero status code by doing: exit($has

[PHP-DEV] [Pre-RFC] Convert exit (and die) from language constructs to functions

2024-02-23 Thread Gina P. Banyard
Hello internals, I've been having this mild annoyance with exit()/die() since I wrote a CLI script using a boolean $hasErrors variable to know if the script failed or not and to indicate if the script failed via a non-zero status code by doing: exit($hasErrors); However, it turns this doesn't wor

Re: [PHP-DEV] [RFC[ Property accessor hooks, take 2

2024-02-23 Thread Larry Garfield
On Fri, Feb 23, 2024, at 4:50 PM, Stephen Reay wrote: >> On 23 Feb 2024, at 22:58, Larry Garfield wrote: >> >> On Fri, Feb 23, 2024, at 8:33 AM, Stephen Reay wrote: On 23 Feb 2024, at 06:56, Larry Garfield wrote: >> >>> Hi Larry, >>> >>> It's good to see this idea still progressing. >>>

Re: [PHP-DEV] [RFC[ Property accessor hooks, take 2

2024-02-23 Thread Larry Garfield
On Fri, Feb 23, 2024, at 5:35 PM, Marc Bennewitz wrote: > Hi Larry, > > first of all thank you very much for this amazing work you two have been > done :+1:. > I'm also feeling that introducing magic variables isn't the best design > choice. > I read your section about "Why do set hooks not retu

Re: [PHP-DEV] [RFC[ Property accessor hooks, take 2

2024-02-23 Thread Marc Bennewitz
Hi Larry, first of all thank you very much for this amazing work you two have been done :+1:. On 23.02.24 00:56, Larry Garfield wrote: On Wed, Feb 21, 2024, at 11:02 PM, Matthew Weier O'Phinney wrote: On Wed, Feb 21, 2024 at 12:57 PM Larry Garfield wrote: After much on-again/off-again work

Re: [PHP-DEV] [RFC[ Property accessor hooks, take 2

2024-02-23 Thread Stephen Reay
 > On 23 Feb 2024, at 22:58, Larry Garfield wrote: > > On Fri, Feb 23, 2024, at 8:33 AM, Stephen Reay wrote: >>> On 23 Feb 2024, at 06:56, Larry Garfield wrote: > >> Hi Larry, >> It's good to see this idea still progressing. >> I have to agree with the other comment(s) that the implicit >> `$f

Re: [PHP-DEV] [RFC[ Property accessor hooks, take 2

2024-02-23 Thread Larry Garfield
On Fri, Feb 23, 2024, at 8:33 AM, Stephen Reay wrote: >> On 23 Feb 2024, at 06:56, Larry Garfield wrote: > Hi Larry, > > It's good to see this idea still progressing. > > > I have to agree with the other comment(s) that the implicit > `$field`/`$value` variables seem odd to me. I understand the

Re: [PHP-DEV] [RFC[ Property accessor hooks, take 2

2024-02-23 Thread Stephen Reay
> On 23 Feb 2024, at 06:56, Larry Garfield wrote: > > On Wed, Feb 21, 2024, at 11:02 PM, Matthew Weier O'Phinney wrote: >> On Wed, Feb 21, 2024 at 12:57 PM Larry Garfield >> wrote: >>> After much on-again/off-again work, Ilija and I are back with a more >>> polished property access hooks/int