> > Documentation tools shouldn't run the code IMO, that means they won't have > access to that feature.
By "documentation tools" do you mean libraries like phpDocumentor? You are right, those need to parse anyway, they cannot use reflection API. But tools for annotation discovery may want to use native reflection instead of parsing, it is an implementation choice. > > Nikic's PHP parser already contains a tool that resolves all namespaces, you > can probably write a similar visitor for the Ast that also works for PHPdoc > blocks. > > Regards, Niklas On 11 December 2017 at 08:46, Marco Pivetta <ocram...@gmail.com> wrote: > Indeed that already exists at > https://github.com/Roave/BetterReflection/blob/2.0.1/docs/features.md#analysing-types-from-docblocks > - relatively new lib, so it probably didn't get noticed upfront in here. Yes, parser / userland solutions exist for this purpose. (I have seen BetterReflection) I just thought since this information is already available, a library that uses reflection API should not need a userland parser to get it. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php