> > There's other functionality that I was less certain about proposing, such 
> > as `iterable\keys(iterable $iterable): array`,
> > which would work similarly to array_keys but also work on Traversables 
> > (e.g. to be used with userland/internal collections, generators, etc.)
>
> I assume this doesn't care about key uniqueness -- it takes the keys
> and makes them values, in the same order they were returned?
>
> In any case, I don't think this should return an iterable, not array,
> to allow for lazy operations in a chain, while also allowing for using
> an array as an optimization.

Oops, I meant to say I think this should return an iterable, not an array.

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to