How to link to official PHP documentation in phpDocumentor 2?

490 views Asked by At

I use the phpDocumentor 2 to describe few methods. I want to link to the official PHP documentation of a native function. I can write something like this:

/**
 * @see http://php.net/manual/en/function.ucfirst.php ucfirst
 */

These don’t work:

/**
 * @see ucfirst
 * @see \ucfirst
 */

Is there a better way? I am looking for something like this:

/**
 * @the-official-documentation-for ucfirst
 */
1

There are 1 answers

1
PaladiN On

You have some issue with your syntax in the documentation. You should use @link instead of @see.

/**
 * @see http://php.net/manual/en/function.ucfirst.php ucfirst
 */

Change your documentation code to

/**
 * @link http://php.net/manual/en/function.ucfirst.php ucfirst
 */

I have tested it and is working on my editor i.e. phpStorm

Note: It only works in the functions and class names. You cannot use it on comments.