in reply to Re^5: Incrementing string arrays when used with foreach loops
in thread Incrementing string arrays when used with foreach loops

Last I checked, push was substantially faster than unshift, which is a pretty good argument for using push/shift rather than unshift/pop.

The first time I checked, the difference was O(1) vs O(n). I fixed that to O(1) for both, but with a significantly worse constant on unshift.

  • Comment on Re^6: Incrementing string arrays when used with foreach loops