Does the for/in loop construct preserve order?

A for loop’s iteration order is controlled by whatever object it’s iterating over. Iterating over an ordered collection like a list is guaranteed to iterate over elements in the list’s order, but iterating over an unordered collection like a set makes almost no order guarantees.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)