array_merge_recursive_numeric()   A
last analyzed

Complexity

Conditions 4
Paths 4

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
eloc 6
nc 4
nop 0
dl 0
loc 10
rs 9.2
c 0
b 0
f 0
1
<?php
2
namespace SimplePDO;
3
4
/**
5
 * Merge arrays based on numeric key.
6
 *
7
 * @return array
8
 */
9
function array_merge_recursive_numeric()
10
{
11
    $output = array();
12
    foreach(func_get_args() as $array) {
13
        foreach($array as $key => $value) {
14
            $output[$key] = isset($output[$key]) ?
15
                array_merge($output[$key], $value) : $value;
16
        }
17
    }
18
    return $output;
19
}
20