Comments are lines in PHP code that are not executed. They are used to explain code, leave notes, or temporarily disable parts of the code.
PHP supports three types of comments:
//
)#
)/* */
)<?php // This is a single-line comment # This is also a single-line comment /* This is a multi-line comment that spans across multiple lines */ echo "Hello, World!"; // This prints Hello, World! ?>
//
and #
for single-line comments/* */
for multi-line commentsHelp others discover Technorank Learning by sharing your honest experience.
Your support inspires us to keep building!