PHP Comments # vs //

前端 未结 8 839
广开言路
广开言路 2020-12-09 08:43

Lately I\'ve been using # instead of // for doing single line comments inside my Code. However, I see must of the people prefer //.

8条回答
  •  盖世英雄少女心
    2020-12-09 09:13

    I think it's merely a matter of taste and preference. The # as comment marker has its roots in shell scripts while // goes back to C++ so depending on the people who read your code and their background one or the other might look unfamiliar.

提交回复
热议问题