Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -2320,14 +2320,17 @@ |
2321 | 2321 | } |
2322 | 2322 | |
2323 | 2323 | /** |
2324 | | - * array_merge() does awful things with "numeric" indexes, including |
2325 | | - * string indexes when happen to look like integers. When we want |
2326 | | - * to merge arrays with arbitrary string indexes, we don't want our |
2327 | | - * arrays to be randomly corrupted just because some of them consist |
2328 | | - * of numbers. |
| 2324 | + * Like array_merge(), but always applying the behavior for string |
| 2325 | + * keys. array_merge() has inconsistent behavior when your string |
| 2326 | + * indexes happen to look like integers, which is undesireable |
| 2327 | + * for arbitrary input. |
2329 | 2328 | * |
2330 | | - * Fuck you, PHP. Fuck you in the ear! |
| 2329 | + * This is roughly equivalent to $array1 + $array2 + $array3... |
| 2330 | + * but has different behavior when there are conflicts. |
2331 | 2331 | * |
| 2332 | + * array_merge() and wfArrayMerge() take the right-hand value, |
| 2333 | + * whereas the + operator takes the left-hand value. |
| 2334 | + * |
2332 | 2335 | * @param array $array1, [$array2, [...]] |
2333 | 2336 | * @return array |
2334 | 2337 | */ |