Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to escape phpdoc comment in phpdoc comment?

Tags:

phpdoc

I would like to know how to escape phpdoc comments within a phpdoc comment.

For example, how would I have to write this:

/**
 * Some documentation...
 *
 * <code>
 * /**
 *  * Example example phpdoc.
 *  */
 * </code>
 */

Obviously above example won't work.

I tried replacing the asterisk's with &#x2A;, but it will just nicely print "&#x2A;"...

like image 524
Tader Avatar asked Feb 05 '09 13:02

Tader


1 Answers

According to DocBlock Description details, you can, as of 1.2.0rc1, write {@*} to write */.

For example:

/**
 * Simple DocBlock with a code example containing a docblock
 *
 * <code>
 *  /**
 *   * My sample DocBlock in code
 *   {@*} 
 * </code>
 */
like image 102
Tader Avatar answered Sep 19 '22 17:09

Tader