Heim  >  Artikel  >  php教程  >  适用于IDE开发环境的PHP文档注释

适用于IDE开发环境的PHP文档注释

WBOY
WBOYOriginal
2016-06-06 19:47:471249Durchsuche

先认识下 PHP 的注释语法 // 和 * ,单行注释和多行注释。 ?php echo hello,world!; // 输出文本,单行注释 ? 或 ?php /* * 输出文本,多行注释 */ echo hello,world!; ? 如果,你要在 Eclipse 环境下开发程序,使用适当的备注语法,能够实现鼠标移动到函数

先认识下PHP的注释语法“//”和“*”,单行注释和多行注释。

echo “hello,world!”;     //输出文本,单行注释

?>

/*

* 输出文本,多行注释

*/

echo “hello,world!”;

?>

如果,你要在Eclipse环境下开发程序,使用适当的备注语法,能够实现鼠标移动到函数名称上就能显示函数信息和参数信息。

/**

    * 生成链接URL

    * @param integer $page 页码

    * @return string 返回字符串值

    */

   private function url($page){

       return str_replace(urlencode('[PAGE]'),$page, $this->url);

   }

?>

param,关键字表示函数参数

returen,关键字表示函数返回值

 

制作人:飞虎                                           无兄弟不编程!
=====================================================================================
欢迎加QQ群进行更多交流:305397511     专注于php、mysql、jquery以及开源框架

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn