I have a question about array performance .... how does PHP handle array keys? I mean, if I do something like $my_city = $cities[15]; .... does php directly access the exact string in the $cities array, or does php iterate the array until it finds a matching string?
and if it accesses the string directly ... is there a performance difference between an array with 100 rows and an array with 100,000 rows?
as in this example $my_city = $cities[15];
source share