octicon-rss(16/)
You've already forked yii2
mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-10 23:50:38 +08:00
Add syntax highlighting [skip ci]
This commit is contained in:
octicon-git-branch(16/)
octicon-tag(16/)
octicon-diff(16/tw-mr-1) 1 changed files with 43 additions and 41 deletions
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user