Is there a faster alternative to using array_unshift? I ran into a small programming example (reversing characters in an array) where I used array_unshift in a foreach() statement. When comparing it to a character set of 10,000 characters, it ran over 1,000 times slower than a direct array assignment routine!
Apparently, array_unshift is actually resizing the array, then moving all values down one position. So, the more characters you throw at it, the slower the process goes.
Any ideas how to get the same functionality without the performance hit?