How to comment your code
Code commenting
Help other developers to understand what your code is doing by commenting in the source files.
PHP comments
Single line comments
Single line v1
Copy to clipboard
/** This is a single line PHP comment */
Single line v2
Copy to clipboard
//This is also a single line PHP comment
Multiline comments
Multiline
Copy to clipboard
/** * Description of what the function is supposed to do with multiline commenting. Place it before the code * @param [Type] [name] [<description>] * @return [Type] [<description>] */
Sample
Copy to clipboard
/** * Minify multiple js files into one single file. * @param $files array of file paths * @param $external array ref to put unminifyable files into. i.e acts as return value * @return string path of minified js file */ private function minifyJSFiles($files, & $external) { }
Smarty comments
Javascript comments
CSS comments