04b PHP Multiline Comments
04b PHP Multiline Comments
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C
Multi-line Comments
Multi-line comments start with /* and end with */ .
/*
The next statement will
print a welcome message
*/
echo "Welcome Home!";
Try it Yourself »
https://www.w3schools.com/php/php_comments_multiline.asp 1/6
1/23/24, 11:38 PM PHP Multiline Comments
Multi-line
Tutorials Comments
Exercises to Ignore
Services Code Sign Up Log in
HTML
We canCSS JAVASCRIPT
use multi-line SQLto prevent
comments PYTHONblocksJAVA
of code PHP HOWexecuted:
from being TO W3.CSS C
Example
Multi-line comment to ignore code:
/*
echo "Welcome to my home!";
echo "Mi casa su casa!";
*/
echo "Hello!";
Try it Yourself »
Example
The + 15 part will be ignored in the calculation:
$x = 5 /* + 15 */ + 5;
echo $x;
Try it Yourself »
https://www.w3schools.com/php/php_comments_multiline.asp 2/6
1/23/24, 11:38 PM PHP Multiline Comments
TAB -
Good IP
proxy
Server
Top quality
residential proxies
+ unlimited
connections +
24/7 customer
support
TABproxy
Open
https://www.w3schools.com/php/php_comments_multiline.asp 3/6
1/23/24, 11:38 PM PHP Multiline Comments
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C
COLOR PICKER
ADVERTISEMENT
ADVERTISEMENT
https://www.w3schools.com/php/php_comments_multiline.asp 4/6
1/23/24, 11:38 PM PHP Multiline Comments
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C
XML Examples
Tutorials Exercises
jQuery Examples
Services C# Certificate
XML Certificate
Sign Up Log in
HTML
CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C
FORUM ABOUT
W3Schools is optimized for learning and training. Examples might be simplified to
improve reading and learning.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we
cannot warrant full correctness
of all content. While using W3Schools, you agree to have read and accepted our terms of
use, cookie and privacy policy.
https://www.w3schools.com/php/php_comments_multiline.asp 6/6