Test, validate and match regular expressions
This regex matches a `@var` annotation followed by a type declaration. It captures the entire type expression, which may include namespaced class names, generics (e.g., `array<int,string>`), array suffixes (e.g., `string[]`), and union types separated by `|` (e.g., `int|string`). It is commonly used to extract type information from PHPDoc comments in PHP codebases, enabling static analysis or documentation generation.