Re: [PHP-DEV] RFC: Records

2024-11-21 Thread Rob Landers
On Sun, Nov 17, 2024, at 08:21, Larry Garfield wrote: > I would far prefer assembling record-ish behavior myself, using the smaller > parts above. Eg: > > final readonly data class Point(int $x, int $y); > > "final" prevents extension. "readonly" makes it immutable. "data" gives it > value-p

Re: [PHP-DEV] opcache_compile_file() declares top-level functions

2024-11-21 Thread Daniil Gentili
>> On 21 November 2024 10:48:46 GMT, Daniil Gentili > > wrote: >> >I speak for myself (and some others, as can be seen by pull requests on >> >some FOSS projects, which made pull requests to account for this >> >behaviour), as a user of preloading who has encount

Re: [PHP-DEV] opcache_compile_file() declares top-level functions

2024-11-21 Thread Samuel Melrose
Thanks for reporting this Ilija, I came across the same problem when using `opcache_compile_file`, and agree it's confusing. For an example, please see the code sample in the opening comment of my PR: https://github.com/php/php-src/pull/16551 As part of my change to allow a read-only file based

Re: [PHP-DEV] opcache_compile_file() declares top-level functions

2024-11-21 Thread Rob Landers
On Thu, Nov 21, 2024, at 13:46, Rowan Tommins [IMSoP] wrote: > > > On 21 November 2024 10:48:46 GMT, Daniil Gentili > wrote: > >I speak for myself (and some others, as can be seen by pull requests on some > >FOSS projects, which made pull requests to account for this behaviour), as a > >user

Re: [PHP-DEV] A new fuzz testing tool for PHP

2024-11-21 Thread Yuancheng Jiang
Thanks for acknowledging FlowFusion. License looks fine to me. Ilija, I will private message you for details. FlowFusion beta is available, let me know if you wanna try. Best, Yuancheng > On 19 Nov 2024, at 16:01, Jakub Zelenka wrote: > > On Tue, Nov 19, 2024 at 12:22 AM Ilija Tovilo

Re: [PHP-DEV] opcache_compile_file() declares top-level functions

2024-11-21 Thread Rowan Tommins [IMSoP]
On 21 November 2024 10:48:46 GMT, Daniil Gentili wrote: >I speak for myself (and some others, as can be seen by pull requests on some >FOSS projects, which made pull requests to account for this behaviour), as a >user of preloading who has encountered this behaviour, understood the reason >

Re: [PHP-DEV] Deprecate alternate switch case syntax?

2024-11-21 Thread Christoph M. Becker
On 21.11.2024 at 10:36, Tim Düsterhus wrote: > This proposal would not affect that. You would just need to add a colon > after the `case` statement, not a semicolon. In fact that would more > closely match the corresponding `switch`, which would also need to have > a colon: > >     > >         s

Re: [PHP-DEV] [Discussion] Make objects unpackable by default

2024-11-21 Thread Gina P. Banyard
On Thursday, 21 November 2024 at 10:05, Christian Schneider wrote: > Am 14.11.2024 um 22:27 schrieb Gina P. Banyard intern...@gpb.moe: > > > Agreed, this bites us constantly when needing to reason about what an > > "object" is in PHP. > > Similar to array it mixes the concept of a struct, with

Re: [PHP-DEV] opcache_compile_file() declares top-level functions

2024-11-21 Thread Daniil Gentili
> This reads rather awkwardly, because you're claiming to speak for some > unknown users ("those who used it") and even for the reader of the message > ("it does what you expect it to do"). > I speak for myself (and some others, as can be seen by pull requests on some FOSS projects, which ma

Re: [PHP-DEV] opcache_compile_file() declares top-level functions

2024-11-21 Thread Rowan Tommins [IMSoP]
On 21 November 2024 08:15:12 GMT, Daniil Gentili wrote: >Hi Ilija, >I believe the removal of function caching is a bit of an overreaction: it was >always known, to those who used it, that preloading will cache functions, and >requires an include guard to avoid function redeclaration errors,

[PHP-DEV] Subject: PHP 8.4.1 Released!

2024-11-21 Thread Saki Takamachi
The PHP development team announces the immediate availability of PHP 8.4.1. This is a security release that addresses CVE-2024-8929, CVE-2024-8932, CVE-2024-11233, CVE-2024-11234, and CVE-2024-11236. This release marks the latest major release of the PHP language. (8.4.0 does not contain security

Re: [PHP-DEV] [Discussion] Make objects unpackable by default

2024-11-21 Thread Christian Schneider
Am 14.11.2024 um 22:27 schrieb Gina P. Banyard : > Agreed, this bites us constantly when needing to reason about what an > "object" is in PHP. > Similar to array it mixes the concept of a struct, with that of a reference > value, and "overloading" various behaviours (e.g. iterators and ArrayAcces

Re: [PHP-DEV] Deprecate alternate switch case syntax?

2024-11-21 Thread Tim Düsterhus
Hi Am 2024-11-20 19:45, schrieb Theodore Brown: I don't feel particularly strongly about it, but I am inclined to write an RFC to deprecate it It doesn't feel big enough to warrant its own RFC, but I would be happy to see it as part of https://wiki.php.net/rfc/deprecations_php_8_5. Best reg

Re: [PHP-DEV] Deprecate alternate switch case syntax?

2024-11-21 Thread Tim Düsterhus
Hi Am 2024-11-20 20:03, schrieb Derick Rethans: All my PHP based templates for the xdebug.org site use this style. I don't think it's atrocious, and quite a bit nicer than the "new" syntax. This proposal would not affect that. You would just need to add a colon after the `case` statement, no

Re: [PHP-DEV] opcache_compile_file() declares top-level functions

2024-11-21 Thread Daniil Gentili
Hi Ilija, I believe the removal of function caching is a bit of an overreaction: it was always known, to those who used it, that preloading will cache functions, and requires an include guard to avoid function redeclaration errors, and in fact it is a very useful feature. There is nothing wrong