Saturday 11 July 2020

Comments in Php

                             Comments

Comments is not Execute in Php. It is part That new Developer can read it and Understand the Code.
Comment section Text Never Show On Browser During Execution.

There are Two Types of Php Comments :

1.  Single-Line Comments.
2. Multiple-Line Comments.

                                       Single Line Comments


<?php

// This is Single-Line Comments.
# This is Single-Line Comments.
echo "Hello World";


?>

By using Single-Line Comment We can Comment a single Statement.



                                          Multiple-Line Comments



<?php

/*
statement-1
statement-2
statement-3
.
..
.
.
*/
echo "Hello World";


?>

By using Multiple-Line Comment We can Comment Multiple Statement.

No comments:

Post a Comment