src/Debug/PhpDoc.php
public static function getParsed($what)
    {
        $hash = null;
        if (\is_object($what)) {
            $hash = self::getHash($what);
            if (isset(self::$cache[$hash])) {
                return self::$cache[$hash];
            }
        }
        $comment = self::getCommentContent($what);
        if (\is_array($comment)) {
            return $comment;
        }
        $return = array(
            'summary' => null,
            'description' => null,
        );
        if (\preg_match('/^@/m', $comment, $matches, PREG_OFFSET_CAPTURE)) {
            // we have tags
            $pos = $matches[0][1];
            $strTags = \substr($comment, $pos);
            $return = \array_merge($return, self::parseTags($strTags));
            // remove tags from comment
            $comment = $pos > 0
                ? \substr($comment, 0, $pos-1)
                : '';
        }
        /*
            Do some string replacement
        */
        $comment = \preg_replace('/^\\\@/m', '@', $comment);
        $comment = \str_replace('{@*}', '*/', $comment);
        /*
            split into summary & description
            summary ends with empty whiteline or "." followed by \n
        */
        $split = \preg_split('/(\.[\r\n]+|[\r\n]{2})/', $comment, 2, PREG_SPLIT_DELIM_CAPTURE);
        $split = \array_replace(array('','',''), $split);
        // assume that summary and desc won't be "0"..  remove empty value and merge
        $return = \array_merge($return, \array_filter(array(
            'summary' => \trim($split[0].$split[1]),    // split[1] is the ".\n"
            'desc' => \trim($split[2]),
        )));
        if ($hash) {
            // cache it
            self::$cache[$hash] = $return;
        }
        return $return;
    }
public static function getParsed($what)
    {
        $hash = null;
        if (\is_object($what)) {
            $hash = self::getHash($what);
            if (isset(self::$cache[$hash])) {
                return self::$cache[$hash];
            }
        }
        $comment = self::getCommentContent($what);
        if (\is_array($comment)) {
            return $comment;
        }
        $return = array(
            'summary' => null,
            'description' => null,
        );
        if (\preg_match('/^@/m', $comment, $matches, PREG_OFFSET_CAPTURE)) {
            // we have tags
            $pos = $matches[0][1];
            $strTags = \substr($comment, $pos);
            $return = \array_merge($return, self::parseTags($strTags));
            // remove tags from comment
            $comment = $pos > 0
                ? \substr($comment, 0, $pos-1)
                : '';
        }
        /*
            Do some string replacement
        */
        $comment = \preg_replace('/^\\\@/m', '@', $comment);
        $comment = \str_replace('{@*}', '*/', $comment);
        /*
            split into summary & description
            summary ends with empty whiteline or "." followed by \n
        */
        $split = \preg_split('/(\.[\r\n]+|[\r\n]{2})/', $comment, 2, PREG_SPLIT_DELIM_CAPTURE);
        $split = \array_replace(array('','',''), $split);
        // assume that summary and desc won't be "0"..  remove empty value and merge
        $return = \array_merge($return, \array_filter(array(
            'summary' => \trim($split[0].$split[1]),    // split[1] is the ".\n"
            'desc' => \trim($split[2]),
        )));
        if ($hash) {
            // cache it
            self::$cache[$hash] = $return;
        }
        return $return;
    }
Rudimentary doc-block parsing

@param string|object|\Reflector $what doc-block string, object, or reflector object

@return array