On 1/1/15 7:32 AM, Idan Arye wrote:
If I have an associative array and I only modify it's values, without
changing the keys, can I assume that the order won't change?

I would never make that assumption. An AA is free to rehash at any time, for whatever reason.

What I would say is that you can probably safely assume an AA will iterate in the same order as long as it hasn't been changed.

If you need guaranteed ordering, use an array or a RedBlackTree.

-Steve

Reply via email to