Include an external example file with syntax highlighting


  • Class docBlock
  • Class Method docBlock
  • Class Property docBlock
  • Constant docBlock


  • The @example tag can be used to parse an example file for syntax highlighting and linking to documentation.
  • A location to a file MUST be defined as a relative or absolute URI, or as a relative or absolute file path.
  • If specified, a positive integer specifies a line number from which to display the example. Not defined, show full file.
  • Number of lines specifies the number of lines to present from the starting line onwards. Not defined, show from “start line” position to end of file.
  • Parse the defined file, and output syntax-highlighted source with line numbers and will then add a link to the documentation to that file.


[cc lang=php”]
* @example [location] [ [] ] []

Return to Tag List

  1. No comments yet.
(will not be published)

Why ask?