[SOLVED] PHP function comments

Issue

I’ve seen that some PHP functions are commented at the top, using a format that is unknown to me:

/**
 *
 * Convert an object to an array
 *
 * @param    object  $object The object to convert
 * @return      array
 *
 */

My IDE gives me a dropdown selection for the things such as @param and @return, so it must be documented somewhere. I’ve tried searching google but it won’t include the @ symbol in its search.

What is this format of commenting and where can I find some information on it?

Solution

That’s PHPDoc syntax.

Read more here: phpDocumentor

Answered By – Josh Leitzel

Answer Checked By – David Marino (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published.