ReflectionDocBlock icon indicating copy to clipboard operation
ReflectionDocBlock copied to clipboard

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

Open oschildt opened this issue 3 years ago • 0 comments

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.

oschildt avatar May 23 '22 11:05 oschildt