Monday, November 23
Trending
- AI-Powered Cyberattacks in 2026: How Hackers Use AI Agents
- US Outages Explained: What Happened to Microsoft, FAA and Banks
- Microsoft 365 Outage: Outlook, Teams and Copilot Down. What We Know
- Diwali Online Shopping Scams 2026: 10 Ways to Stay Safe
- 10 Best DDoS Protection Services for 2027
- 12 Best Web Application Firewalls (WAF) for 2027
- Best Ethical Hacking Tools in 2027: Free & Paid Picks
- Software supply chain attacks 2026: Timeline and developer checklist
A comment is non-executable lines. It is used to write a description for a better understanding. The web browser doesn’t read the comments.
- Single line comments
- Multi-lines comments
Single line comments:
There are two ways to use single-line comments in PHP.
// (C++ style single line comment)
# (Unix Shell-style single line comment)
<?php
echo "Welcome to PHP language";
// (C++ style single line comment)
# (Unix Shell-style single line comment)
?>
Multi-line comments
Multi-line comments are used to comment on multiple lines. For multi-line comments, we need to enclose all lines within /* … */.
<?php
/*
This is a comment with a multi-line comment
Developer: infovistar.com
*/
echo “Welcome to PHP language”;
?>



