[PHP-DEV] [VOTE] Add array_is_list(array $array): bool

2021-01-06 Thread tyson andre
Hi internals, Voting on https://wiki.php.net/rfc/is_list has started. The vote closes on 2020-01-20. After discussion, the function name and signature was changed to `array_is_list(array $array): bool` to avoid confusion with the possibility of earlier name choices conflicting with

Re: [PHP-DEV] ENT_COMPAT for htmlentities and htmlspecialchars

2021-01-06 Thread Craig Francis
On Wed, 6 Jan 2021 at 15:46, Nikita Popov wrote: > On Sat, Dec 26, 2020 at 12:03 PM Craig Francis > wrote: > >> Hi, >> >> Could htmlspecialchars() use ENT_QUOTES by default? >> >> [...] > > > I agree that we should switch the default to ENT_QUOTES. I also agree that > we should enable

Re: [PHP-DEV] Re: Improving PRNG implementation.

2021-01-06 Thread Go Kudo
Hello Nikita. > In addition to the functions you already list, I'd add >function rng_bytes(RNGInterface $rng, int $length): string; >function rng_between(RNGInterface $rng, int $min, int $max): int; Certainly these are useful. I've added this to the RFC in TypeC. > Just to share another

Re: [PHP-DEV] [RFC] Adding return types to internal methods (PHP 8)

2021-01-06 Thread Nicolas Grekas
On Mon, Dec 28, 2020 at 7:54 PM Máté Kocsis wrote: > > > Hi Internals, > > > > Last year, Nikita started a discussion about adding return types > > to non-final internal methods: https://externals.io/message/106539 . > > > > I'd like to restart the conversation, since I've just created an > >

Re: [PHP-DEV] Re: [RFC] Phasing out Serializable

2021-01-06 Thread Nikita Popov
On Tue, Dec 15, 2020 at 12:14 AM Björn Larsson wrote: > Den 2020-12-07 kl. 16:49, skrev Nikita Popov: > > On Mon, Dec 7, 2020 at 3:49 PM Björn Larsson > > wrote: > > > >> Den 2020-12-07 kl. 15:11, skrev Nikita Popov: > >> > >>> Hi internals, > >>> > >>> Picking up a loose thread: > >>>

Re: [PHP-DEV] [RFC] [Discussion] Measuring maximum execution time based on wall-time

2021-01-06 Thread Nikita Popov
On Sun, Dec 13, 2020 at 1:25 AM Máté Kocsis wrote: > Hi Everyone, > > Thanks for all the insightful feedbacks so far, I went ahead, and wrote a > proper > RFC: https://wiki.php.net/rfc/max_execution_wall_time > > Regards: > Máté > Something potentially worth pointing out (and assuming I'm

Re: [PHP-DEV] ENT_COMPAT for htmlentities and htmlspecialchars

2021-01-06 Thread Nikita Popov
On Sat, Dec 26, 2020 at 12:03 PM Craig Francis wrote: > Hi, > > Could htmlspecialchars() use ENT_QUOTES by default? > > I recently worked on an example script, where I tried to keep it simple by > using htmlspecialchars directly, e.g. > > echo ""; > > I'd completely forgotten that single

Re: [PHP-DEV] [RFC] Adding return types to internal methods (PHP 8)

2021-01-06 Thread Nikita Popov
On Mon, Dec 28, 2020 at 7:54 PM Máté Kocsis wrote: > Hi Internals, > > Last year, Nikita started a discussion about adding return types > to non-final internal methods: https://externals.io/message/106539 . > > I'd like to restart the conversation, since I've just created an > implementation >

Re: [PHP-DEV] Re: Straw poll: Naming for `*any()` and `*all()` on iterables

2021-01-06 Thread Nikita Popov
On Wed, Jan 6, 2021 at 3:40 PM Levi Morrison wrote: > On Wed, Jan 6, 2021 at 1:55 AM Nikita Popov wrote: > > > > On Wed, Jan 6, 2021 at 2:28 AM tyson andre > > wrote: > > > > > Hi internals, > > > > > > > I've created a straw poll for the naming pattern to use for `*any()` > and > > > `*all()`

Re: [PHP-DEV] Re: Straw poll: Naming for `*any()` and `*all()` on iterables

2021-01-06 Thread Levi Morrison via internals
On Wed, Jan 6, 2021 at 7:39 AM Levi Morrison wrote: > > On Wed, Jan 6, 2021 at 1:55 AM Nikita Popov wrote: > > > > On Wed, Jan 6, 2021 at 2:28 AM tyson andre > > wrote: > > > > > Hi internals, > > > > > > > I've created a straw poll for the naming pattern to use for `*any()` and > > > `*all()`

Re: [PHP-DEV] Re: Straw poll: Naming for `*any()` and `*all()` on iterables

2021-01-06 Thread Levi Morrison via internals
On Wed, Jan 6, 2021 at 1:55 AM Nikita Popov wrote: > > On Wed, Jan 6, 2021 at 2:28 AM tyson andre > wrote: > > > Hi internals, > > > > > I've created a straw poll for the naming pattern to use for `*any()` and > > `*all()` on iterables. > > >

Re: [PHP-DEV] Re: Improving PRNG implementation.

2021-01-06 Thread Nikita Popov
On Tue, Jan 5, 2021 at 6:40 PM Go Kudo wrote: > Thanks Nikita. > > Thanks for the input. This looks like a very smart solution. > I've edited the RFC and added a new proposal as TypeC. > > https://wiki.php.net/rfc/object_scope_prng > In addition to the functions you already list, I'd add

[PHP-DEV] Re: [VOTE] Restrict $GLOBALS usage

2021-01-06 Thread Nikita Popov
On Wed, Dec 23, 2020 at 10:08 AM Nikita Popov wrote: > Hi internals, > > As there was no further feedback, I've opened voting on > https://wiki.php.net/rfc/restrict_globals_usage. The vote closes on > 2021-01-06. > Happy to announce that the RFC has been accepted unanimously, with 48 votes in

Re: [PHP-DEV] [RFC] Enumerations, Round 2

2021-01-06 Thread Nikita Popov
On Tue, Jan 5, 2021 at 6:56 PM Larry Garfield wrote: > On Tue, Jan 5, 2021, at 8:26 AM, Nikita Popov wrote: > > > Nice work, I like the updated proposal. Some notes: > > > > > Similarly, enum names and case names are both case insensitive. > > > > I agree that enum names should be case

Re: [PHP-DEV] [RFC] Add is_list(mixed $value): bool to check for list-like arrays

2021-01-06 Thread Nikita Popov
On Wed, Jan 6, 2021 at 1:46 AM tyson andre wrote: > Hi internals, > > > > > I probably brought this up in a previous thread, but I think it's > worth > > > > considering again here, given recent changes to the RFC: > > > > > > > > I think it would make more sense to introduce this as `function >

Re: [PHP-DEV] Re: Straw poll: Naming for `*any()` and `*all()` on iterables

2021-01-06 Thread Nikita Popov
On Wed, Jan 6, 2021 at 2:28 AM tyson andre wrote: > Hi internals, > > > I've created a straw poll for the naming pattern to use for `*any()` and > `*all()` on iterables. > > https://wiki.php.net/rfc/any_all_on_iterable_straw_poll > > > > Background: The RFC