[PHP-DEV] Discussion before submission of array_transpose() RFC

2022-04-23 Thread mickmackusa
I am seeking constructive feedback/advice that will give me the best chance of a successful RFC when I eventually submit it. Introduction: PHP developers have had an appetite for transposing data for many years; this is indicated by the nearly 100 Stack Overflow pages on this narrow topic. There

Re: [PHP-DEV] Canonicalize "iterable" into "array|Traversable" and Reflection

2022-04-23 Thread G. P. B.
On Sat, 23 Apr 2022 at 19:19, Marco Pivetta wrote: > Hey George, > > How would the engine behave (with this RFC included) with an inheritance > check? > > Specifically: > > interface A { > function foo(interable $param): iterable; > } > interface B { > function foo(array|\Trabersable $par

Re: [PHP-DEV] Canonicalize "iterable" into "array|Traversable" and Reflection

2022-04-23 Thread Marco Pivetta
Hey George, How would the engine behave (with this RFC included) with an inheritance check? Specifically: interface A { function foo(interable $param): iterable; } interface B { function foo(array|\Trabersable $param): array|\Traversable: } Would they be compatible with each other, if p

Re: [PHP-DEV] Canonicalize "iterable" into "array|Traversable" and Reflection

2022-04-23 Thread G. P. B.
On Sat, 23 Apr 2022 at 19:06, Larry Garfield wrote: > On Sat, Apr 23, 2022, at 7:27 AM, G. P. B. wrote: > > Hello internals, > > > > One area the engine currently needs to take special care is dealing with > > the typing relation between iterable, Traversable, and array. > > The change is to cano

Re: [PHP-DEV] Canonicalize "iterable" into "array|Traversable" and Reflection

2022-04-23 Thread Larry Garfield
On Sat, Apr 23, 2022, at 7:27 AM, G. P. B. wrote: > Hello internals, > > One area the engine currently needs to take special care is dealing with > the typing relation between iterable, Traversable, and array. > The change is to canonicalize "iterable" into "array|Traversable" as this > then remove

[PHP-DEV] Canonicalize "iterable" into "array|Traversable" and Reflection

2022-04-23 Thread G. P. B.
Hello internals, One area the engine currently needs to take special care is dealing with the typing relation between iterable, Traversable, and array. The change is to canonicalize "iterable" into "array|Traversable" as this then removes this special case. However, doing so breaks Reflection for

[PHP-DEV] Re: LOCK_SH for file_get_contents ?

2022-04-23 Thread Hans Henrik Bergan
can we at least change FILE_USE_INCLUDE_PATH to 8 / (1<<3) ? that would allow a userland implementation of file_get_contents to support LOCK_SH and FILE_USE_INCLUDE_PATH The current situation is so bad that FILE_USE_INCLUDE_PATH literally cannot be used in strict_mode=1, it's pretty much complete