Can I use a hash sign (#) for commenting in PHP?

前端 未结 11 722
你的背包
你的背包 2021-01-31 13:07

I have never, ever, seen a PHP file using hashes (#) for commenting. But today I realized that I actually can! I\'m assuming there\'s a reason why everybody uses

11条回答
  •  眼角桃花
    2021-01-31 13:33

    If you establish some rule sets in your team / project... the 2 types of comments can be used to outline the purpose of the commented code.

    For example I like to use # to mute / disable config settings, sub functions and in general a piece of code that is useful or important, but is just currently disabled.

提交回复
热议问题