public static function merge_data_recursive($a, $b)
    {
        $args = func_get_args();
        $t = $args[0];
        $array = is_array($t);

        foreach ($args as $k => $a) {
            $args[$k] = self::ar($a, null, true);
        }

        $args = call_user_func_array('array_merge_recursive', $args);
        
        if (!$array) {
            $args = self::sc($args, null, true);
        }

        return $args;
    }
public static function merge_data_recursive($a, $b)
    {
        $args = func_get_args();
        $t = $args[0];
        $array = is_array($t);

        foreach ($args as $k => $a) {
            $args[$k] = self::ar($a, null, true);
        }

        $args = call_user_func_array('array_merge_recursive', $args);
        
        if (!$array) {
            $args = self::sc($args, null, true);
        }

        return $args;
    }
public static function merge_data_recursive ( $ a , $ b ) { $ args = func_get_args ( ) ; $ t = $ args [ 0 ] ; $ array = is_array ( $ t ) ; foreach ( $ args as $ k => $ a ) { $ args [ $ k ] = self :: ar ( $ a , null , true ) ; } $ args = call_user_func_array ( 'array_merge_recursive' , $ args ) ; if ( ! $ array ) { $ args = self :: sc ( $ args , null , true ) ; } return $ args ; }
Allows deep merging of arrays and objects. same usage
as array_merge_recursive.

@param array|object $a target
@param array|object $b addition

@return array|object same type as $a
Allows deep merging of arrays and objects . same usage as array_merge_recursive .