How to write comments in PHP
In this tutorial, we are going to learn about how to write the comments in PHP.
There are two ways to write comments in PHP.
Single line comment
To we can write a single line comment in PHP, we can use the forward slashes //
followed by the comment.
Here is an example:
// this is a single-line comment
Multiline comments
To write a multiline comment, we can use PHP’s /*
and */
syntax.
Here is an example:
/*
you can
see mee
in multiple lines
*/
The multiline comment starts after the /*
and ends at */
.