every key from the outer array pointing at a non-iterable value is in place
the one key from the outer array pointing at an iterable is skipped (as expected)
the two keys from the inner array are placed where their outer-key would be (as expected) but come with the key they have in the inner array, leading to overruling existing keys.
That seems to be true for both, yield $key => $value as well as yield from $iterable.
I'm not sure if that's to be considered a bug since "keep keys intact" could be a feature as well.
Hey there.
Flatten and flatMap reuse already yielded keys, which is perfectly fine as a traversable but swallows data when converting to array.
Demo code 1:
Result 1:
Demo code 2:
Result 2:
Seems like
That seems to be true for both,
yield $key => $value
as well asyield from $iterable
.I'm not sure if that's to be considered a bug since "keep keys intact" could be a feature as well.
Regards, Stephan.