PHP - Multi dimensional SESSION array a good or bad idea for performance?

arrays, multidimensional-array, php, session

Solution

I'd say it depends more on the size of the data and not on the number of dimensions, because the data is serialized before storing. Of course, a deep multi-dimensional array may cause a performance hit too, but this is a common indicator that there's a better way to do it.

Problem

Are there any reasons not to want to use a multi dimensional SESSION array to store temporary user data?

Original source