This tutorials tells you, how to use PHP comments in your php code. This part of PHP lets the developer write human-readable lines. It is an optional but essential part.
PHP Comments help the developer to explain steps and way of reasoning throughout the program, it enabling the easier maintenance.
// Hide all your lines here and no user one will see.
If you are familiar with the C programming language, you must have come across this style of commenting. It provides algorithms and pseudocode used in finding solutions.
The rules of PHP are lenient on whitespaces. This feature is significant in web design in achieving minimalism on the front end. It is also vital as far as coding is concerned.
Notice the many spaces. Did you find the mistakes? Well compare that with the following piece of code.
The two sets of code are similar and give the following output.
There is nothing wrong with any of the code sets above. However, appropriate usage of whitespaces is for enhancement of readability.
PHP is case sensitive. This is the part of rules of PHP that describes the definition of variables.
In the following code, the use of the same word for a variable but different cases will be interpreted by the parser as different words.
PHP is a really powerful language that can be used to create dynamic systems. As we saw earlier, big companies have adopted it and used it to great lengths. You can learn the trade too, only of you follow the rules of PHP carefully and practice often.