One of the most important parts in any programming language is comments. Is a very good practice to comment every part of the code (variables, functions, classes, etc).
PHP has several types of comments:
Single line comment:
//Comment goes here
Single line comment (another option):
#Comment goes here
Multi line comment:
/*
Comment goes here
*/
Comment goes here
*/
API Documentation:
/**
* Function Description
*
* @param string $my_var
*/
function my_function($my_var) {
"code goes here"
}
* Function Description
*
* @param string $my_var
*/
function my_function($my_var) {
"code goes here"
}

Post new comment