<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web Design company - Goweb99 blog &#187; php comments</title>
	<atom:link href="http://www.goweb99.com/blog/tag/php-comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.goweb99.com/blog</link>
	<description>Get your website designed for as low as $99.</description>
	<lastBuildDate>Fri, 30 Jul 2010 20:27:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using Comments in PHP</title>
		<link>http://www.goweb99.com/blog/php-tutorial/using-comments-in-php/</link>
		<comments>http://www.goweb99.com/blog/php-tutorial/using-comments-in-php/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 07:22:04 +0000</pubDate>
		<dc:creator>tutor</dc:creator>
				<category><![CDATA[PHP Tutorial]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php comments]]></category>
		<category><![CDATA[PHP Tutorials]]></category>
		<category><![CDATA[PHP Tuts]]></category>

		<guid isPermaLink="false">http://www.goweb99.com/blog/?p=345</guid>
		<description><![CDATA[Comments are used in every programming language for making the code better to understand.
The PHP comment syntax, like other programming language, begins with a special character sequence and all text that appears between the start of the comment and the end will be ignored.
Comments are written to have better readability and understandability of the code. [...]]]></description>
			<content:encoded><![CDATA[<p>Comments are used in every programming language for making the code better to understand.</p>
<p>The PHP comment syntax, like other programming language, begins with a special character sequence and all text that appears between the start of the comment and the end will be ignored.</p>
<p>Comments are written to have better readability and understandability of the code. They provide information about the code, or sometimes omits a part of code which may not be used at present ar for a particular scenario like for testing.</p>
<p>A comment&#8217;s main purpose is to serve as an informative note to you, the web developer or to others who may view your source code.</p>
<p>PHP&#8217;s comments are not displayed to the visitors visiting the website, even if they view the page’s source. The only way to view PHP comments is to open the PHP file for editing. So for this reason, the PHP comments are useful only for the developers, unlike HTML, where the visitor can also view the comments.</p>
<p>PHP Comments is of two types</p>
<ul>
<li>Single line &#8211; // or # followed by the line to be commented out.</li>
<li>Multiple lines &#8211; /*   */ is used to mark the beginning and the end of multiple lined comment.</li>
</ul>
<p><strong>PHP Comment Syntax: Single Line Comment</strong></p>
<p>The single line comment tells the interpreter to ignore everything that occurs on that line to the right of the comment. To do a single line comment type &#8220;//&#8221; or &#8220;#&#8221; and all text to the right will be ignored by PHP interpreter.</p>
<div class="example">For eg:</p>
<p>&lt;?php<br />
echo &#8220;It&#8217;s so good to be here!&#8221;;                    // This will print out It&#8217;s so good to be here!<br />
echo &#8220;&lt;br /&gt;There are comments on this page but you can&#8217;t see them&#8230;!!!&#8221;;<br />
// echo &#8220;This is not for you&#8221;;<br />
// echo &#8220;My name is Tutor!&#8221;;<br />
# echo &#8220;I am the PHP programmer&#8221;;<br />
?&gt;</p></div>
<div class="example">Output:</p>
<p>It&#8217;s so good to be here!<br />
There are comments on this page but you can&#8217;t see them&#8230;!!!</p></div>
<p>Some of our echo statements were not evaluated because we commented them out with the single line comment.</p>
<p>This type of line commenting is often used for quick notes about complex and confusing code or to temporarily remove a line of PHP code, may be for testing.</p>
<p><strong>PHP Comment Syntax: Multiple Line Comment</strong></p>
<p>The multi-line PHP comment can be used to comment out multiple lines of code or writing multiple line comments. The multiple line PHP comment begins with &#8221; /* &#8221; and ends with &#8221; */ &#8220;.</p>
<div class="example">For eg:</p>
<p>&lt;?php<br />
/* This Echo statement will print out my message to the<br />
the place in which I reside on.  In other words, the World. */<br />
echo &#8220;It&#8217;s so good to be here!&#8221;;<br />
/* echo &#8220;My name is Tutor!&#8221;;<br />
echo &#8220;I am the PHP programmer!&#8221;;<br />
*/<br />
?&gt;</p></div>
<div class="example">Output:</p>
<p>It&#8217;s so good to be here!</p></div>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong>Good Commenting Practices</strong></p>
<p>The best commenting practice is to use them, anywhere and everywhere, where there is a need to put some extra detail, so that everyone viewing the code can atleast understand the structure.</p>
<p>Use single line comments for quick notes about a tricky part in your code and use multiple line comments when you need to elaborate on some function or some construct.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.goweb99.com/blog/php-tutorial/using-comments-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
