Re: [PHP-DEV] ARRAY_UNIQUE_IDENTICAL option

2022-11-07 Thread tyson andre
Hi Levi Morrison, > A bit off topic, but not entirely: > > In my opinion, adding another flag isn't the _real_ fix. Any function > which does comparisons should take a callable for users to provide any > comparison they wish. An iteratively better API would be: > >     function array_unique(list $

Re: [PHP-DEV] ARRAY_UNIQUE_IDENTICAL option

2022-11-07 Thread Ilija Tovilo
To avoid noise I will respond to all e-mails at once. --- Hi someniatko > Perhaps an alternative idea is to provide a default string value for > enums which are not baked, > Nikolas had already brought up this idea earlier. As others have mentioned, this opens the door for type coercion issues

[PHP-DEV] [RFC][Vote] Destructuring Coalesce

2022-11-07 Thread Bob Weinand
Hey, I've just opened the vote on the https://wiki.php.net/rfc/destructuring_coalesce RFC. It will end on November 21. Bob

[PHP-DEV] Re: RFC [Discussion]: Randomizer Additions

2022-11-07 Thread Joshua Rüsweg via internals
Hi You can find the RFC at: https://wiki.php.net/rfc/randomizer_additions Proof of concept implementation is in: * https://github.com/php/php-src/pull/9664 * https://github.com/php/php-src/pull/9679 we believe we resolved all open questions with the RFC and there was no recent feedback wit

Re: [PHP-DEV] [RFC][Discussion] Arbitrary static variable initializers

2022-11-07 Thread Larry Garfield
On Sun, Nov 6, 2022, at 1:48 PM, Ilija Tovilo wrote: > Hi everyone > > I'd like to propose my next RFC. It lifts the restriction of only > using constant expressions in static variable initializers. Let me > know if you have any thoughts or concerns. > > https://wiki.php.net/rfc/arbitrary_static_va

Re: [PHP-DEV] ARRAY_UNIQUE_IDENTICAL option

2022-11-07 Thread Levi Morrison via internals
A bit off topic, but not entirely: In my opinion, adding another flag isn't the _real_ fix. Any function which does comparisons should take a callable for users to provide any comparison they wish. An iteratively better API would be: function array_unique(list $array, callable(T $a, T $b): in