public static function mergeAttrs($b, $a, $combineClasses = true, $combineStyles = true)
    {
        $a = self::parseAtts($a);
        $b = self::parseAtts($b);

        if ($combineClasses && isset($a['class']) && isset($b['class'])) {
            $a['class'] = self::mergeClasses($a['class'], $b['class']);
            unset($b['class']);
        }

        if ($combineStyles && isset($a['style']) && isset($b['style'])) {
            $a['style'] = self::mergeStyles($a['style'], $b['style']);
            unset($b['style']);
        }

        $r = array_merge($b, $a);

        ksort($r);

        return $r;
    }