Add syntax highlighting [skip ci]

This commit is contained in:
octicon-git-branch(16/)
octicon-tag(16/)
pana1990
2015-01-05 18:54:10 +01:00
gitea-unlock(16/)
parent 9271c0407d
commit 60ef866708

26
docs/guide/helper-array.md
View File

@@ -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>