public static function split($str, $chars = null, $max = 0)
    {
        $result = self::EMPTY_STR;

        if (null === $str) {
            return null;
        }

        if (self::EMPTY_STR === $str) {
            return array();
        }

        if (null === $chars) {
            $result = \preg_split('/\s+/', $str, $max);
        } elseif ($max > 0) {
            $result = \explode($chars, $str, $max);
        } else {
            $result = \explode($chars, $str);
        }

        return $result;
    }