ColonelSandersLite wrote:As far as memory goes, you're aware that memory is *cheap*?
That's popular misconception that only holds true in desktop and low-load server market (and even there nowadays you get pretty limited memory). Once you get to even moderate load (in order of several millions hits per day) memory starts being the most precious resource. And at any time you have only so much, and there are always better uses for it other than wasting it just because you don't like some part of php syntax.
ColonelSandersLite wrote:At $20-$30 per gig, quite frankly, you can reasonably supply any memory consumption a php program will use for next to nothing on all but the busiest of servers.
No, you're limited by what amount of memory you can stuff into the motherboard. And, unless you're running your own servers, adding memory is not a one-time spending - it increases your monthly server bill.
ColonelSandersLite wrote:Hell, once you start talking about servers that busy, it's cheaper to throw more memory at it than pay a programmer to search for and implement code optimizations.
We weren't talking about optimizations, that's how many people approach such task
from the start.
You see, you asked why people use associative arrays. You've been given your answer: 9 times of 10 they use it for readability. $row['userid'] is more readable than $row[7]. After that it quickly deteriorated to 'is there any way to not use it?'. Yes, there are ways, all of them with their own shortcomings making them questionable to pursue.
Now ask yourself what you're doing now in this thread? Trying to convince us to not use associative arrays? That's not gonna happen, especially since you haven't offered any compelling reasons aside from 'they are more characters to type'. Trying to justify not changing anything in the way you code? That's hardly a valuable goal, and you don't have to do it publicly.