|
|
|
@ -239,20 +239,22 @@ Encoding will use application charset and could be changed via third argument.
|
|
|
|
|
|
|
|
|
|
## Merging Arrays <a name="merging-arrays"></a> |
|
|
|
|
|
|
|
|
|
```php |
|
|
|
|
/** |
|
|
|
|
* Merges two or more arrays into one recursively. |
|
|
|
|
* If each array has an element with the same string key value, the latter |
|
|
|
|
* will overwrite the former (different from array_merge_recursive). |
|
|
|
|
* Recursive merging will be conducted if both arrays have an element of array |
|
|
|
|
* type and are having the same key. |
|
|
|
|
* For integer-keyed elements, the elements from the latter array will |
|
|
|
|
* be appended to the former array. |
|
|
|
|
* @param array $a array to be merged to |
|
|
|
|
* @param array $b array to be merged from. You can specify additional |
|
|
|
|
* arrays via third argument, fourth argument etc. |
|
|
|
|
* @return array the merged array (the original arrays are not changed.) |
|
|
|
|
*/ |
|
|
|
|
* Merges two or more arrays into one recursively. |
|
|
|
|
* If each array has an element with the same string key value, the latter |
|
|
|
|
* will overwrite the former (different from array_merge_recursive). |
|
|
|
|
* Recursive merging will be conducted if both arrays have an element of array |
|
|
|
|
* type and are having the same key. |
|
|
|
|
* For integer-keyed elements, the elements from the latter array will |
|
|
|
|
* be appended to the former array. |
|
|
|
|
* @param array $a array to be merged to |
|
|
|
|
* @param array $b array to be merged from. You can specify additional |
|
|
|
|
* arrays via third argument, fourth argument etc. |
|
|
|
|
* @return array the merged array (the original arrays are not changed.) |
|
|
|
|
*/ |
|
|
|
|
public static function merge($a, $b) |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Converting Objects to Arrays <a name="converting-objects-to-arrays"></a> |
|
|
|
|