Re: [PHP-DEV] Alias stdClass to DynamicObject?

2021-09-07 Thread Marc Bennewitz
On 06.09.21 17:28, Nikita Popov wrote: Hi internals, In the thread for deprecation of dynamic properties, Rowan suggested that we alias "stdClass" to "DynamicObject" in https://externals.io/message/115800#115802. I wanted to split this discussion off into a separate thread, as this can be

Re: [PHP-DEV] Alias stdClass to DynamicObject?

2021-09-07 Thread Larry Garfield
On Tue, Sep 7, 2021, at 4:22 AM, Nikita Popov wrote: > On Mon, Sep 6, 2021 at 6:50 PM Kamil Tekiela wrote: > > > Hi Nikita, > > > > I think this might be a good idea, but I would like to propose yet another > > variant. > > Replace stdClass with DynamicObject and keep stdClass as an alias. It

Re: [PHP-DEV] Alias stdClass to DynamicObject?

2021-09-07 Thread Kamil Tekiela
Hi Marc, The name seems to be ok IMHO. Even though it is a class, the main use case is to denote an object that was created dynamically rather than through an instantiation of a class. And I know that a lot of usage comes from people directly creating new instances of stdClass but if you do that

Re: [PHP-DEV] Alias stdClass to DynamicObject?

2021-09-07 Thread Levi Morrison via internals
On Mon, Sep 6, 2021 at 9:29 AM Nikita Popov wrote: > > Hi internals, > > In the thread for deprecation of dynamic properties, Rowan suggested that > we alias "stdClass" to "DynamicObject" in > https://externals.io/message/115800#115802. I wanted to split this > discussion off into a separate

[PHP-DEV] Option for array_column() to preserve keys.

2021-09-07 Thread Andreas Hennings
Hello internals, The function array_column() would be much more useful if there was an option to preserve the original array keys. I can create an RFC, but I think it is better to first discuss the options. This is requested in different places on the web, e.g.

Re: [PHP-DEV] Adding a way to disable the stat cache

2021-09-07 Thread Nikita Popov
On Fri, Sep 3, 2021 at 7:10 PM Kevin Lyda wrote: > [sent a second time, now to the list, sorry] > > On Fri, Sep 3, 2021 at 3:53 PM Christian Schneider > wrote: > > How can you say "it never was a problem" if we never had to live without > stat cache? > > Can you back up that claim with numbers?

Re: [PHP-DEV] [RFC] Random Extension 3.0

2021-09-07 Thread Nikita Popov
On Sat, Sep 4, 2021 at 10:57 PM Marc wrote: > > On 9/2/21 5:10 PM, Go Kudo wrote: > > Hi Internals. > > > > Expanded from the previous RFC and changed it to an RFC that organizes > the > > whole PHP random number generator. Also, the target version has been > > changed to 8.2. > > > >

Re: [PHP-DEV] [RFC] Random Extension 3.0

2021-09-07 Thread Nikita Popov
On Thu, Sep 2, 2021 at 5:10 PM Go Kudo wrote: > Hi Internals. > > Expanded from the previous RFC and changed it to an RFC that organizes the > whole PHP random number generator. Also, the target version has been > changed to 8.2. > > https://wiki.php.net/rfc/rng_extension >

Re: [PHP-DEV] Alias stdClass to DynamicObject?

2021-09-07 Thread Nikita Popov
On Mon, Sep 6, 2021 at 6:50 PM Kamil Tekiela wrote: > Hi Nikita, > > I think this might be a good idea, but I would like to propose yet another > variant. > Replace stdClass with DynamicObject and keep stdClass as an alias. It can > be deprecated in 8.3. > If we only add an alias, I am afraid

Re: [PHP-DEV] [RFC] [VOTE] is_literal

2021-09-07 Thread Craig Francis
On Mon, 19 Jul 2021 at 19:59, Craig Francis wrote: > On Mon, 5 Jul 2021 at 19:14, Craig Francis > wrote: > >> I have opened voting on https://wiki.php.net/rfc/is_literal for the >> is-literal function. >> > > This RFC has been rejected; with 10 votes in favour, and 23 against. > [...] > And

Re: [PHP-DEV] Adding a way to disable the stat cache

2021-09-07 Thread Kamil Tekiela
> It would be great if someone on Windows and macos could repeat this experiment I ran this on Windows and I got the following results: Native Windows build: Without cache real0m31.170s user0m0.000s sys 0m0.000s With cache real0m0.694s user0m0.000s sys 0m0.000s Ubuntu

Re: [PHP-DEV] Adding a way to disable the stat cache

2021-09-07 Thread Kamil Tekiela
It's WSL2 uname -r 5.4.72-microsoft-standard-WSL2

Re: [PHP-DEV] [RFC] $this return type

2021-09-07 Thread Michał Marcin Brzuchalski
Hi Nikita, wt., 7 wrz 2021 o 12:29 Nikita Popov napisał(a): > Hi internals, > > I'd like to pick up a loose thread from the future scope of the > https://wiki.php.net/rfc/static_return_type RFC, the $this return type for > fluent APIs: > > https://wiki.php.net/rfc/this_return_type > > I have

[PHP-DEV] [RFC] $this return type

2021-09-07 Thread Nikita Popov
Hi internals, I'd like to pick up a loose thread from the future scope of the https://wiki.php.net/rfc/static_return_type RFC, the $this return type for fluent APIs: https://wiki.php.net/rfc/this_return_type I have some reservations about this (which basically come down to $this not being a

Re: [PHP-DEV] Adding a way to disable the stat cache

2021-09-07 Thread Hans Henrik Bergan
WSL1 or WSL2? afaik they have significant performance differences, and we should only consider WSL2 as WSL1 is being deprecated afaik On Tue, 7 Sept 2021 at 12:31, Kamil Tekiela wrote: > > It would be great if someone on > Windows and macos could repeat this experiment > > I ran this on Windows

Re: [PHP-DEV] Adding a way to disable the stat cache

2021-09-07 Thread Pierre Joye
Hi, On Tue, Sep 7, 2021, 5:49 PM Kamil Tekiela wrote: > It's WSL2 > uname -r > 5.4.72-microsoft-standard-WSL2 > no need to test on wsl2, that's a dockerized linux. best, Pierre >

Re: [PHP-DEV] [RFC] $this return type

2021-09-07 Thread Andreas Heigl
Hey Nikita On 07.09.21 12:28, Nikita Popov wrote: Hi internals, I'd like to pick up a loose thread from the future scope of the https://wiki.php.net/rfc/static_return_type RFC, the $this return type for fluent APIs: https://wiki.php.net/rfc/this_return_type I have some reservations about

Re: [PHP-DEV] [RFC] $this return type

2021-09-07 Thread Christoph M. Becker
On 07.09.2021 at 15:02, Andreas Heigl wrote: > On 07.09.21 12:28, Nikita Popov wrote: > >> I'd like to pick up a loose thread from the future scope of the >> https://wiki.php.net/rfc/static_return_type RFC, the $this return type >> for >> fluent APIs: >> >>

Re: [PHP-DEV] [RFC] $this return type

2021-09-07 Thread Sebastian Bergmann
Am 07.09.2021 um 12:28 schrieb Nikita Popov: I have some reservations about this (which basically come down to $this not being a proper "type", so should it be in the type system?) but I can see the practical usefulness, so I think it's worth discussing this. I am not conviced that there is