首页
开发手册
应用中心
工具
用户中心
FoundPHP Code Comment
English
中文简体
English
上一篇
下一篇
###FoundPHP Code Comment During the FoundPHP development process, it is recommended that every developer get used to writing clear remarks. We recommend two ways to write remarks. **Method one:** This method is used for more complicated remarks, mostly used for function library and class library description ```php /* statistical methods str statistical characters */ function foundphp_cnt($str){ echo $str; } ``` **Method Two:** Double slashes, this method is used for single-line comments, used to verify judgments or loop method descriptions ```php //Determine whether the variable exists if(!empty($config)){ echo 'does not exist'; } //Loop foundPHP settings foreach($foundphp_set AS $k=>$v){ //Determine whether the data is valid if($v['id']==1){ echo 'valid data'; }else{ echo 'invalid data'; } } ``` For better explanation, you can also add the date and author abbreviation at the end of the remarks ```php //Determine whether the variable exists [2021-02-14/tonsen] if(!empty($config)){ echo 'does not exist'; } //Loop foundPHP settings [2021-02-14/tonsen] foreach($foundphp_set AS $k=>$v){ //Determine whether the data is valid [2021-02-14/tonsen] if($v['id']==1){ echo 'valid data'; }else{ echo 'invalid data'; } } ```