When declaring an array in PHP, the index may not be created in order ... Ie
Array [1] = 1 Array [19] = 2 Array [4] = 3
My question is. When creating an array like this, is length 19 with zeros in between? If I tried to get Array [3], would it come as undefined or throw an error? Also, how does this affect memory. Will memory with index 3 be busy or 19?
Also, the developer is currently writing a script with 3 arrays FailedUpdates [] FailedDeletes [] FailedInserts []
How much more efficient is it to do this, or to do it in the case of an associative array managing multiple submatrices
"Failures" array(){
["Updates"] => array(){
[0] => 12
[1] => 41
}
["Deletes"] => array(){
[0] => 122
[1] => 414
[1] => 43
}
["Inserts"] => array(){
[0] => 12
}
}
source
share