protected static function sortGroupList(AbstractNode $a, AbstractNode $b)
    {
        if (get_class($a) != get_class($b)) {
            return 0;

            /* workaround for PHP bug #50688 */
            throw new Ts3Exception("invalid parameter", 0x602);
        }

        if (!$a instanceof Servergroup && !$a instanceof Channelgroup) {
            return 0;

            /* workaround for PHP bug #50688 */
            throw new Ts3Exception("convert error", 0x604);
        }

        if ($a->getProperty("sortid", 0) != $b->getProperty("sortid", 0) && $a->getProperty(
                "sortid",
                0
            ) != 0 && $b->getProperty("sortid", 0) != 0
        ) {
            return ($a->getProperty("sortid", 0) < $b->getProperty("sortid", 0)) ? -1 : 1;
        }

        return ($a->getId() < $b->getId()) ? -1 : 1;
    }