Search code examples
phpphpdoc

Showing a literal "@link" in phpDoc


I'm writing a phpDocumentor mini-tutorial for a lightning talk, and I'm using, of course, phpdoc to generate examples. When it comes to information on how to use inline @link tags though, I haven't found a way that works, yet. I've tried both the html entity for @ (@) and escaping with a backslash among other things, but to no avail. Does anyone know the magic syntax to escape @link?


Solution

  • Use an extra closing brace immediately following the @ character... from the manual [1]:

    If I want to use the characters "{@link" in a docblock, I just use "{@}link."

    [1] -- http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_inlinetags.pkg.html