The Importance of Using Comments in PHP Programming


PHP Comments is a very versatile language, allowing for programmers to make applications according to their various tastes or styles. But one thing all programmers should maintain is the ability to comment effectively. In essence, commenting can save hours of time perusing code months down the road- and is often required by employers.

Comments aren’t parsed by the PHP engine, so they are only visible to those who are viewing the original source code of the file. This is great for documenting what each code block does, all while keeping the casual visitor to a website oblivious to the extra comments present on the application they are using.

Unlike HTML comments, PHP comments aren’t even visible in the source code of a website. HTML comments are visible to the general public, which can potentially lead to the stealing of code or may even help hackers exploit applications. PHP comments aren’t output to the browser at all, so they are completely safe from prying eyes.

There are actually three operators that we may use to tell the PHP engine that we want to use a comment. Single inline comments can be used with the “//” and “#” operators. For multiple-line comments, we use “/*” and “*/” respectively to indicate what is a comment and what is actually PHP code. While the first two operators are synonymous, the last one discussed is the only one that can perform multiple line comments with relatively little work.

Unknown to most, PHP comments can also be used for more practical scenarios, such as troubleshooting. Expert programmers will find they have a problem with their application, and comment out different blocks of code to see what is causing the error. While it is usually in new code blocks, this method will indeed show that sometimes the problem is due to program code interacting wrong, which can in effect mean the problem is anywhere in the application.

Commenting in PHP is also great to use in selection structures, since PHP has long been known as a hard to scale language. Once files start getting big, it can be dizzying to try and remember which loops and selection structures go where, and what they do. By commenting out every closing bracket, and what it is in relation to, the problem is easily fixed. This is often mandatory for programmers who work for employers.

Closing Comments

PHP Comments are quite handy as we can see, more so than most would think. From troubleshooting to simple documentation, the three methods of commenting have a lot of use to the proper programmer. For more information on comments in PHP, and in other languages, check out more books, articles, and magazines for a more detailed guide in using them effectively.

The question above of which web development language is the best is very rarely answer subjectively. In fact, a quick search engine check results in numerous blog posts and forums littered with people giving their own opinion with nothing but their experience of a few languages (and sometimes only one!) under their belt.

The truth is that this question is somewhat moot. The main thing to consider when it comes to web development is that you are happy and confident in the abilities of the development company you are using to produce your applications.

Hypertext pre-processor

In regard to web development languages, there are several to choose from. The most widely used is PHP, which stands for hypertext pre-processor although it did originally stand for Personal Home Page when it was originally created. Social Media sites such as Facebook and Yahoo are built using PHP to give a few examples.


The second most widely used is ASP.NET which stands for Active Server Page and was created and supported by Microsoft. Now in its fourth iteration, this web platform is fully extensible and a very mature competitor to PHP in the web development industry.


The main difference between the two languages is the fact that PHP is compile on page load, so every time a user visits a page on a site, the PHP code is compile server side and the results send to the client. With ASP.NET, the source code is compile prior to deployment, meaning that the framework itself has a significantly low overhead on the server in terms of page loading speeds.

As the page is , the server simply loads the compiled file and sends it to the client. This means that on paper, the ASP.NET framework is faster than PHP. Although it must be note that PHP has some very clever caching mechanisms now available. Which minimises this performance issue considerably.

A developer who utilises both of the above languages should be hard press to tell you. What one language can do that the other could not. Choice generally depends on developer preference and provided they are a capable programmer. They will be able to produce identical systems on either platform using either language.

Web engineering projects

Web engineering projects are manage from start to finish in a logical manner. Ensuring that the solution is develope on time. And most importantly on budget utilising developers with decades of experience all backed up with a no quibble guarantee. That you will get a fully functional web application exactly to your specification.

Easy to use language

ASP dot net provides ASP Help, ASP Code, ASP web development, ASP Tutorials, and all web programming solutions. It helps the web developer to build an effective and dynamic website. Most of the website developers prefer this language, because it is easy to use.

Facilitates large application development

This is easy to write a page. It facilitates you to develop the large applications. It offers HTML and source code in combinations. This language truly served, net development world. ASP. Net is the best technology on server side in which, code is used, before sending to a browser from executing on the server. The code that is sent to a browser is HTML not ASP dot net. This language truly served the Internet development world since 2002.

Provide easy accessing data

ASP dot net allows you all kinds of changes in the content of your web page. It’s a very flexible language and provides easy accessing data that send the results back to the browser.



Please enter your comment!
Please enter your name here