public function _getProgramElementName(&$tokens, $key)
    {
        $name = '';
        $key++;
        while (
            $tokens[$key] && (
                $tokens[$key] == '&' || (
                    isset($tokens[$key][0]) && isset($tokens[$key][1]) && (
                    $tokens[$key][0] == T_WHITESPACE ||
                    $tokens[$key][0] == T_STRING ||
                    $tokens[$key][0] == T_NS_SEPARATOR
                )
            )
        )) {
            if (isset($tokens[$key][1])) {
                $name .= $tokens[$key][1];
            }
            $key++;
        }

        return trim($name);
    }