On Mon, 20 Feb 2023 at 14:38, Andreas Hennings wrote:
> Hello,
> the RFC seems like a good idea to me.
> However, I do not see any mention of plus operator on arrays, e.g. ['a' =>
> 'A'] + ['b' => 'B']. The array_reduce() would support this, but I think
> array_sum() would not, because of the ret
Hello,
the RFC seems like a good idea to me.
However, I do not see any mention of plus operator on arrays, e.g. ['a' =>
'A'] + ['b' => 'B']. The array_reduce() would support this, but I think
array_sum() would not, because of the return type. I just think this should
be made more explicit.
-- Andre
Hello internals,
If there are no further feedback I intend on opening the vote for this
tomorrow.
Best regards,
George P. Banyard
Hello internals,
I've slightly updated the RFC:
https://wiki.php.net/rfc/saner-array-sum-product
I've added an FFI example which overloads addition but cannot be cast to a
numeric type.
And changed the behaviours around objects. An object needs to implement a
numeric cast for it to be added/multi
On Wed, 18 Jan 2023 at 15:06, Derick Rethans wrote:
> On Tue, 17 Jan 2023, G. P. B. wrote:
>
> > I would like to start the discussion about the Saner
> > array_(sum|product)() RFC:
> > https://wiki.php.net/rfc/saner-array-sum-product
> >
> > Currently, the array_sum() and array_product() behave d
On Tue, 17 Jan 2023, G. P. B. wrote:
> I would like to start the discussion about the Saner
> array_(sum|product)() RFC:
> https://wiki.php.net/rfc/saner-array-sum-product
>
> Currently, the array_sum() and array_product() behave differently than
> their userland implementation as they ignore
Hello internals,
I would like to start the discussion about the Saner array_(sum|product)()
RFC:
https://wiki.php.net/rfc/saner-array-sum-product
Currently, the array_sum() and array_product() behave differently than
their userland implementation as they ignore arrays and objects, and cast
the re