Thursday, 13 February 2014

Comments in php

comments php
Comments In php
This is a tutorial for comments inside php. In php or any program you use you would be knowing how important is commenting in codes to understand to find proper codes easily there are two types of commenting methods one is single line comment and second is multiple line comments. comments help us and other programmer what program does and where its going.We can write note for copy-write reasons. If we pass our codes to other coder or for modification by other programmer comments are useful to explain them what we want to do actually

Example for single line comments (Screenshot1):-


Comments in php
Example for single line comments (Screenshot1)
<?php
//Uses echo language construct  to output the text "Hello World." to the Browser
//echo 'Hello world.";

?>

output(Screenshot2) :-




Comments in php
Screenshot2
In this codes we had comments codes and out comment both in “//” so will not display in browser it will only show to the coded file which is useful only for programmer to see program flow. we can also comments codes which had error but later useful we can comment them.

Example for single line comments (Screenshot3):-

Example for single line comments
Example for single line comments (Screenshot3):-
<?php
//Uses echo language construct to output the text "Hello World." to the Browser
echo 'Hello world.";

?>


Output (Screenshot4):-


Comments in php
Output (Screenshot4)

Example for multiline Comments (Screenshot5):-

Example for multiline Comments
Example for multiline Comments (Screenshot5):-
<?php
/*
Author:Mohammed
Date:7/3/2013
*/
//Uses echo language construct to output the text "Hello World." to the Browser
echo 'Hello world.";
?>


Output (Screenshot6):-

Comments in php
Output (Screenshot6):-
Mutliline comments is used for note in our codes.


No comments:

Post a Comment

Thanks For Comment Will get you Soon..

About Me

Welcome to Extra Tutorials! My name is Mohammed and I am the 22 year writer, website developer, and photographer behind the blog. Thanks for visiting! Tutorials Jackpot… In addition to Developer, I love to develop websites and I love to write. Starting a php Blog was inevitable for me. What began as a simple way to share all of my Tutorials with friends and family has developed into my Part time job.

Mohammed Padela

WHAT IS PHP PROGRAMMING

WHAT IS PHP PROGRAMMING
WHAT IS PHP PROGRAMMING

Follow Us

Popular Posts

Designed ByBlogger Templates