Add syntax highlighting [skip ci]

This commit is contained in:
pana1990
2015-01-05 18:54:10 +01:00
parent 9271c0407d
commit 60ef866708

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