While it *is* indeed a workaround, you can very easily
access the values of the array from the keys, since that
literally is what the keys are for.

While I also think it's weird that not all php array functions
with callbacks do pass the key as an argument, and while
I also stumbled upon that problem in the past myself
multiple times, I also think it is worth taking the time to
consider what other people from this mailing list are
bringing up. If it could indeed break internal callbacks,
then I think using the workaround could be a better idea
than potentially breaking other things.

On Wed, Jul 17, 2024 at 2:38 AM Bilge <bi...@scriptfusion.com> wrote:
>
> On Wed, 17 Jul 2024, 01:29 mickmackusa, <mickmack...@gmail.com> wrote:
>>
>> It is untrue that you "can't access it"; you just need to use an array of 
>> keys as the input array.
>
> It is absolutely true and your workaround is just that; a workaround that 
> doesn't work at all when you also need the value.
>
> Cheers,
> Bilge

Reply via email to