core/Utils.php
public static function extend(array $a1, array $a2)
    {
        foreach ($a2 as $key => $item) {
            if (!isset($a1[$key])) {
                $a1[$key] = $item;
            } else {
                if (is_array($item) && is_array($a1[$key])) {
                    $a1[$key] = self::extend($a1[$key], $item);
                } else {
                    $a1[$key] = $item;
                }
            }
        }
        return $a1;
    }
public static function extend(array $a1, array $a2)
    {
        foreach ($a2 as $key => $item) {
            if (!isset($a1[$key])) {
                $a1[$key] = $item;
            } else {
                if (is_array($item) && is_array($a1[$key])) {
                    $a1[$key] = self::extend($a1[$key], $item);
                } else {
                    $a1[$key] = $item;
                }
            }
        }
        return $a1;
    }
扩展数组
@param array $a1
@param array $a2
@return array