Software Development Exam  >  Software Development Videos  >  PHP for beginners  >  PHP Tutorial 6 - Comments (PHP For Beginners)

PHP Tutorial 6 - Comments (PHP For Beginners) Video Lecture | PHP for beginners - Software Development

30 videos

FAQs on PHP Tutorial 6 - Comments (PHP For Beginners) Video Lecture - PHP for beginners - Software Development

1. What is the purpose of comments in PHP?
2. How to write a single-line comment in PHP?
Ans. To write a single-line comment in PHP, you can use the double forward slash (//) followed by the comment text. Anything after the double slash on the same line will be treated as a comment and will not be executed by the PHP interpreter.
3. What is the syntax for writing a multi-line comment in PHP?
Ans. To write a multi-line comment in PHP, you can enclose the comment text between /* and */. Everything between these symbols will be treated as a comment and will not be executed by the PHP interpreter. This allows you to comment out multiple lines of code at once.
4. Can comments be nested in PHP?
Ans. No, comments cannot be nested in PHP. This means that you cannot start a comment inside another comment. If you try to do so, it will result in a syntax error. However, you can use multiple single-line or multi-line comments consecutively to achieve a similar effect.
5. Are comments visible in the final output of a PHP program?
Ans. No, comments are not visible in the final output of a PHP program. They are purely for documentation and readability purposes and have no impact on the actual execution of the code. The PHP interpreter ignores comments completely, and they are not displayed in the browser or any other output medium.
Related Searches

Objective type Questions

,

pdf

,

Sample Paper

,

Free

,

PHP Tutorial 6 - Comments (PHP For Beginners) Video Lecture | PHP for beginners - Software Development

,

Previous Year Questions with Solutions

,

past year papers

,

video lectures

,

Viva Questions

,

Semester Notes

,

PHP Tutorial 6 - Comments (PHP For Beginners) Video Lecture | PHP for beginners - Software Development

,

PHP Tutorial 6 - Comments (PHP For Beginners) Video Lecture | PHP for beginners - Software Development

,

shortcuts and tricks

,

mock tests for examination

,

study material

,

ppt

,

MCQs

,

Exam

,

practice quizzes

,

Extra Questions

,

Important questions

,

Summary

;