Re: Calling array_merge / array_merge_recursive without arguments
| From: | G. P. B. | Date: | Sun, 19 May 2019 19:13:25 +0000 |
| Subject: | Re: Calling array_merge / array_merge_recursive without arguments | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-105754@lists.php.net to get a copy of this message | ||
On Sat, 18 May 2019 at 21:37, Dik Takken <d.takken@xs4all.nl> wrote:
> On 17-05-19 22:52, G. P. B. wrote:
> >
> > So as a side note aren't there maybe some other array functions which
> > behave like this?
> >
>
> Good point. I did a quick scan of the source code and came up with a
> list of possible candidates for a similar treatment:
>
> array_map()
> array_diff() & friends
> array_intersect() & friends
> compact()
>
> While I would not expect these functions to be used a lot with spread
> operators in the same way array_push() or array_merge() are used, fixing
> them in the same way may still be good for the sake of consistency.
>
> Any other functions I overlooked?
>
Doesn't seem there are other relevant array functions which could benefit
from this after having a glance at it.
Best regards
George P. Banyard