July 14, 2010超赞的注释技巧

Author : Kunn | Views : 300 | No Comments

Category: 编程技术 | Tages: , ,

作为一名coder, 大家在调试程序的时候, 一定有过为大段的程序反复的注释/反注释, 这无意中带来了烦躁, 这里介绍一个注释的小技巧, 很赞. 只需要删除/增加第一个’/'字符就可方便实现注释/反注释了. 不多解释, 一看就明白了…

$id = get_user_id();
$age = get_user_age($id);

//*
debug_output($id);
debug_output($age);
var_dump(get_user_data($id));
//*/

$data = get_user_data($id);

[via Aleembawany]

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.