CLASS web

PHP

annotation

Annotation

You can use annotations to write what phrases you want to leave in the source as you program, what programming sources do what, and so on.
If you want to comment out multiple lines of text
Start with / *
The end is * /
You can do this.

for examples

<?php
  /*
    echo "hello world";
    This is the source for the first time you learn the echo statement and the phrase hello world on the screen.
    I enjoy this job so much. However, hello world is inside a annotation so it is not printed.
  */
?>

I'll check the results right below.







If you enter the source above, the result is nothing. This is because the echo statement is commented out.

Use // to process annotations on a single line.

<?php
    echo "hello world";
    //echo "hello world2";
    //I enjoy this job so much. However, hello world is inside a annotation so it is not printed. hello world
?>

I'll check the results right below.







The code above used a single line annotation. Only the uncommented part will work properly.





ALL COMMENTS 0

Sort by

PinkCoding

PinkCoding

X

PinkCoding

Web Scratch Pad

X

loading

            
            
        

Back to the course