Almost all the programming languages allow you to add comments to your code. Comments are read only by humans - the interpreter doesn’t evaluate them. Comments serve as notes for those who wrote them and other developers. There are two types of comments in php:
Single line comments start with
//. Whatever follows after will not be evaluated or executed.
A comment can take up the whole line:
<?php // For Winterfell!
or can follow some code on the same line:
<?php print_r('I am the King'); // => For Lannisters!
Multiline comments start with
/* and end with
*/. Each line between them should start with a
<?php /* * The night is dark and * full of terrors. */ print_r('I am the King');
Create a single line comment with the folowing text:
You know nothing, Jon Snow!.
Comment — A comment is just a text and it doesn’t affect program execution. Programmers use it to add notes for themselves and for their colleagues
Please sign in with your GitHub account, this is necessary to track the progress of the lessons. If you do not have an account yet, now is the time to create an account on Github.