I'm doing a project in laravel and would like to know the appropriate use of commenting with
1. #
O
2. //
I appreciate your help
I'm doing a project in laravel and would like to know the appropriate use of commenting with
1. #
O
2. //
I appreciate your help
To make comments you have the following options, I also do the clarification that this that I show you does not have to see directly with the Laravel framework if not rather with the language with which is written below that is PHP
We can see that this style of comment is inherited from C where you will continue to ignore code until you find the following sign */
useful for commenting complete blocks of code where you need it to be ignored a certain amount of code for example where find functions or complete classes of code
Multi-line comment
/*
$name1 = "hola";
$name2 = "hi";
*/
Single line comment
This style of comments is inherited from C ++ of a single line and is observed more commonly to comment single lines of code inside scripts or files that for example in this case end in extension .php
//$name1 = "Hola";
Comment a single line of code with #
This type of comments is more like commenting on code from the console / terminal / cmd and also only serves to comment on a single line of code
#$name1 = "Hola";