[PHP-DEV] Request for opinions: bug vs feature - change in tokenization of yield from

2024-07-17 Thread Juliette Reinders Folmer
Hi all, I recently discovered a change was made to the Tokenizer in PHP 8.3.0 which now allows for a comment to exist between the `yield` and `from` keyword from the `yield from` keyword. Before PHP 8.3, this was a parse error. This change was not documented (anywhere) nor publicized, which i

Re: [PHP-DEV] [RFC] Lazy Objects

2024-07-17 Thread Larry Garfield
On Wed, Jul 17, 2024, at 6:31 PM, Nicolas Grekas wrote: > A bit unrelated to the above topic: we've further clarified the RFC by > addition restrictions to what can be done with lazy proxies. Namely, > when the factory returns an object from a parent class, we describe > that adding more on the

Re: [PHP-DEV] [RFC] Lazy Objects

2024-07-17 Thread Nicolas Grekas
Dear all, Le mar. 16 juil. 2024 à 17:51, Nicolas Grekas a écrit : > Hi there, > > Le mar. 16 juil. 2024 à 10:13, Nicolas Grekas < > nicolas.grekas+...@gmail.com> a écrit : > >> >> >> Le lun. 15 juil. 2024 à 21:42, Tim Düsterhus a écrit : >> >>> Hi >>> >>> On 7/15/24 09:25, Nicolas Grekas wrote:

[PHP-DEV] [RFC] [Vote] Add bcdivmod to BCMath

2024-07-17 Thread Saki Takamachi
Hi all! RFC: Add bcdivmod to BCMath has started voting. https://wiki.php.net/rfc/add_bcdivmod_to_bcmath Voting ends on 2024-08-01 00:00:00 UTC. Regards, Saki

Re: [PHP-DEV] array_reduce callback key

2024-07-17 Thread Larry Garfield
On Wed, Jul 17, 2024, at 9:01 AM, Bilge wrote: > On 17/07/2024 01:41, Levi Morrison wrote: >> Adding arguments to a function can mess up internal callbacks, btw, so I >> don't like modifying the >> existing function. > Which internal callbacks can be messed up by this change? They clearly > aren'

Re: [PHP-DEV] array_reduce callback key

2024-07-17 Thread Bilge
On 17/07/2024 01:41, Levi Morrison wrote: Adding arguments to a function can mess up internal callbacks, btw, so I don't like modifying the existing function. Which internal callbacks can be messed up by this change? They clearly aren't tested, as the build is passing. Cheers, Bilge

Re: [PHP-DEV] array_reduce callback key

2024-07-17 Thread Lily Bergonzat
It would make sense for it to be the last argument. My first thought was also that PHP doesn't usually care if you add extra arguments, but "internal callbacks" made me think they were C callbacks, and in that case I don't really know. On Wed, Jul 17, 2024 at 10:08 AM Rob Landers wrote: > > On We

Re: [PHP-DEV] array_reduce callback key

2024-07-17 Thread Rob Landers
On Wed, Jul 17, 2024, at 09:55, Lily Bergonzat wrote: > While it *is* indeed a workaround, you can very easily > access the values of the array from the keys, since that > literally is what the keys are for. > > While I also think it's weird that not all php array functions > with callbacks do pas

Re: [PHP-DEV] array_reduce callback key

2024-07-17 Thread Lily Bergonzat
While it *is* indeed a workaround, you can very easily access the values of the array from the keys, since that literally is what the keys are for. While I also think it's weird that not all php array functions with callbacks do pass the key as an argument, and while I also stumbled upon that prob