Skip to content

Referring a global variable with @see $varname in a docblock causes  #335

Description

@oschildt

Let's say I have the following PHP Code

/**
 * This is a global var.
 *
 * @see $varname
 */
$varname = "test";

/**
 * This is a class
 *
 * @see $varname
 */
class Base
{
}

When I try to parse it

$factory  = \phpDocumentor\Reflection\DocBlockFactory::createInstance();
$docblock = $factory->create($docComment);

Ir crashes the PHP engine in version 8.0.6 and 8.1.6.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions