Re: [PHP-DEV] [RFC] Fibers

2020-12-22 Thread Aaron Piotrowski
Hi Mike, > On Dec 21, 2020, at 7:38 PM, Mike Schinkel wrote: > > Would it be appropriate of me to ask for a section that discusses how that > might be done in user space in the RFC, at least with some simple > pseudo-code, or if is it non-trivial than a link to where it is discussed in > dept

Re: [PHP-DEV] #[Deprecated] Attribute

2020-12-22 Thread Bruce Weirdan
On Tue, Dec 22, 2020 at 8:55 PM Sara Golemon wrote: > > You could do that now with a polyfill from userspace. If the annotation > need not have an effect, then it's just any other userspace implementation. > It's possible now, while the attribute is not provided by PHP. But once it gets introdu

[PHP-DEV] "POST Content-Length of 131279729 bytes exceeds the limit of 67108864 bytes in Unknown on line 0"

2020-12-22 Thread Nuno Peralta
Hello, I'd like to open this for discussion. Many times, I get this in the error logs: /[20-Dec-2020 00:00:39 UTC] PHP Warning: POST Content-Length of 131279729 bytes exceeds the limit of 67108864 bytes in Unknown on line 0/ I'd like to give the suggestion to PHP developers to make it more u

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

2020-12-22 Thread Josh Bruce
>> tl;dr: Could add flags to is_array. > > Please, no. > > PHP needs fewer flags, not more. > > -Mike lol - There’s something to be said for that. Thinking of “simple" bridges that can be built toward a possible larger discussion around naming and defining things and not adding more to the SL

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

2020-12-22 Thread Mike Schinkel
> On Dec 22, 2020, at 8:22 AM, Josh Bruce wrote: > > >> For example, with >> >> $a = ['foo', 'bar', 'baz’]; >> >> `is_list()` will return `true`, but if you run `$a` through `asort()`, >> `is_list()` will return `false` because the keys are no longer >> consecutive integers, but is there a

[PHP-DEV] Name for new, efficient array iterator?

2020-12-22 Thread Levi Morrison via internals
The existing ArrayIterator has a large API surface. In most cases it will duplicate the input array either out of ease of implementation or as consequence of the API. Given that a significant use case for ArrayIterator is to write generic code for Iterators that also work on arrays, it is a pretty

Re: [PHP-DEV] #[Deprecated] Attribute

2020-12-22 Thread Sara Golemon
On Tue, Dec 22, 2020 at 12:35 PM Nicolas Grekas < nicolas.grekas+...@gmail.com> wrote: > It would be great to allow adding this attribute on classes. What about > allowing it right now and not bind it to any runtime side-effect? That > would allow static analyzers to do their job. Same for consts

Re: [PHP-DEV] #[Deprecated] Attribute

2020-12-22 Thread Nicolas Grekas
Hi Benjamin, I have updated the RFC for a #[Deprecated] attribute that wasn't completed > for PHP 8.0 due to time constraints and I am able to restart the discussion > now. > > https://wiki.php.net/rfc/deprecated_attribute > > The following updates have been made: > > - focus on only method and fu

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

2020-12-22 Thread tyson andre
Hi Levi, > I want to re-iterate my opinion on this discussion thread: anything > with a prefix is a hard-no from me. Namespaces are literally designed > for this, and I will not vote "yes" to `iter_all`, `iterable_all`, > etc, no matter what the prefix is. Anything without a namespace is a > no fr

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

2020-12-22 Thread Craig Duncan
On Tue, 22 Dec 2020 at 16:21, Larry Garfield wrote: > That's why I am OK with most options except `iterable_`, because that's a > lot of needless typing. > Whether the prefix is iterable or iter or just i, I'll always be typing iany and hitting enter, letting my IDE do the leg work, avoiding any

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

2020-12-22 Thread Levi Morrison via internals
On Sat, Dec 19, 2020 at 1:24 PM 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 https://wiki.php.net/rfc/any_all_on_iterable

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

2020-12-22 Thread Pierre
Le 22/12/2020 à 16:27, tyson andre a écrit : Hi Pierre, This is the kind of reasoning I fully support usually, I do maintain a few libraries for multiple PHP versions as most people in this list and make things easily polifyllable is something I'm sensible to. Nevertheless, the language and it

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

2020-12-22 Thread Larry Garfield
On Tue, Dec 22, 2020, at 9:27 AM, tyson andre wrote: > Hi Pierre, > > > This is the kind of reasoning I fully support usually, I do maintain a > > few libraries for multiple PHP versions as most people in this list and > > make things easily polifyllable is something I'm sensible to. > > > > Ne

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

2020-12-22 Thread tyson andre
Hi Go Kudo, **A possible alternative that is widely used in other programming languages is to limit the interface API to only generating bytes/integers,** and to provide global functions that would use generic random number generator objects (from internal or user-provided code) in their algorit

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

2020-12-22 Thread tyson andre
Hi Pierre, > This is the kind of reasoning I fully support usually, I do maintain a > few libraries for multiple PHP versions as most people in this list and > make things easily polifyllable is something I'm sensible to. > > Nevertheless, the language and its standard library has to evolve at

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

2020-12-22 Thread G. P. B.
On Tue, 22 Dec 2020 at 16:05, tyson andre wrote: > Hi Marco, > > >Hey Tyson, > > > > I know I'm being stubborn, but we have namespaces, but also an "old > guard" that doesn't understand its own programming language 🤷‍♀️ > > I assume it's a case of not liking them or assuming others wouldn't like

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

2020-12-22 Thread zeriyoshi
Thanks. I have edited the RFC based on your question. > Method names: you don't need to emulate the conventions from non-OOP code, e.g. string_shuffle() --> strShuffle and array_rand() --> arrayRand(). Use a more naturally readable convention like shuffleString(). As mentioned in the RFC, it is i

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

2020-12-22 Thread tyson andre
Hi Marco, >Hey Tyson, > > I know I'm being stubborn, but we have namespaces, but also an "old guard" > that doesn't understand its own programming language 🤷‍♀️ I assume it's a case of not liking them or assuming others wouldn't like them instead of not understanding them. Namespaces for http

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

2020-12-22 Thread Josh Bruce
> For example, with > >$a = ['foo', 'bar', 'baz’]; > > `is_list()` will return `true`, but if you run `$a` through `asort()`, > `is_list()` will return `false` because the keys are no longer > consecutive integers, but is there any doubt this is still a list? > Maybe in a pure sense, it’s n

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

2020-12-22 Thread Eugene Sidelnyk
Fully agree with Marco On Tue, Dec 22, 2020, 1:00 PM Marco Pivetta wrote: > Hey Tyson, > > I know I'm being stubborn, but we have namespaces, but also an "old guard" > that doesn't understand its own programming language 🤷‍♀️ > > On Sat, Dec 19, 2020, 21:24 tyson andre wrote: > > > Hi internals

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

2020-12-22 Thread Marco Pivetta
Hey Tyson, I know I'm being stubborn, but we have namespaces, but also an "old guard" that doesn't understand its own programming language 🤷‍♀️ On Sat, Dec 19, 2020, 21:24 tyson andre wrote: > Hi internals, > > I've created a straw poll for the naming pattern to use for `*any()` and > `*all()`