PHP versus ASP: Worth the Argument?


Desktop-as-a-Service Designed for Any Cloud ? Nutanix Frame

PHP: The Overview

PHP stands for Hypertext Preprocessor. Reading the title alone can alert you to the fact that this is a server-side processing language that reveals itself in the form of HTML. The most common use of this is web forms. Data is sent from the client to the web server. Information is processed and returns results.

This versatile language is not restricted to web access in the least. PHP also can be used in command-line processing and also installed as an extension to your own operating system. This will cause the PHP files to open with the PHP executable.

The use of databases is one of PHP's strengths. MySQL, SQL, Microsoft Access, Oracle, and InterBase are just a few of the many possibilities to work with.

ASP: The Overview

ASP is short for Active Server Pages. This too is a server-side scripting language. Microsoft has incorporated this language into their servers for more dynamic built-in objects. These are known as Component Object Models (COM).

Although not restricted only to being run on an IIS (Internet Information Services) server, its only full functionality can come through IIS. This first came with Windows 2000 and the NT4 Option Pack. ASP was not restricted to IIS. PWS (Personal Web Server) also was able to interpret ASP code on Windows NT, 95, and 98. However, it was limited in its functionality.

Cost issues

Many people like to argue the cost of ASP versus PHP. I would agree that this can be a concern for some, but really is not a major concern. Most buy IIS for the Microsoft integration. This being the case, IIS is worth the extra money for those expenses.

PHP is free to the extent of the Apache Web Server. The Apache Software Foundation offers a rather secure—but best of all, free—web server. With this, PHP can be installed for free. The only true costs expended are the server to run it, and the time to install it.

Speed questions

Here is where the most arguing is spent for loyalists of both sides of the server-side scripting world. This has been a large debate since both languages came into existence. This is an area that I do believe is greatly significant.

When an Operating System (OS) delegates memory to applications, the application will usually give back the memory. Operating Systems do not ask for that memory back so long as the application is still in use. PHP has a unique way of using this memory usage to its advantage. PHP grabs a memory block and holds it. When it frees up, it is not returned, but held for whatever processing that might take place in the future. This can be edited in the configuration file.

ASP is a little slower due to its COM-based architecture. Because it is calling object models, the machine must load those. This is similar to a programming language referencing a control. The memory usage, however, is not all that different from a standard application.

Truly, the main distinguishing factor will always be the computer on which the web server is run. If the machines are not similar, the language on the faster machine will indeed be faster than the other no matter what the strengths of memory or processor usage.

Compatibility Thoughts

When referring to the "C" word, many questions are quickly raised. No two computers are the same and for this reason people want to be assured that what they have will operate with what they already have obtained.

I would say that PHP has the ball in this category. Its winning card is Open Source. This means that PHP has a potential of unlimited developers behind it, greater resources, and a larger library of documentation. Due to all of these factors, much more is developed in addition and more is able to be learned by the programmer.

ASP is commonly thought to only run on IIS. As I mentioned earlier, this is not exactly the case. ASP can, in fact, run on Apache. Apache ASP is a port that enables limited ASP functionality on any Apache web server. The only requirement is mod_perl being enabled.

Always remember that PHP can run on any platform. Mac OS X, Windows, Linux, and Solaris all are among its possible Operating Systems.

Security Considerations

Anything can be hacked, no matter how strong the security. The only thing lacking is the time and the resources of how to do it.

Apache's security options make it more secure than Windows Server Operating Systems. IIS is known for many security holes and constant patching. However, I will not be one to say that Apache is security foolproof.

Programming Heritage

ASP has its roots in Microsoft's most commonly known language, Visual Basic. For this reason, it is very simple to learn and incorporate. PHP has more of a C++ language base. I believe that this also contributes to its speed abilities.

ASP's Common Misconception

ASP.NET and ASP are not the same. ASP.NET is a complete rewrite of the ASP programming language and, for this reason, most of it is not backwards compatible. .NET was written to fit more into the newer Microsoft architecture.


Personally, I would say that PHP is faster, easier, more compatible, more secure, and even cheaper to work with. This is not to say that ASP will never be part of my projects. I just prefer to use PHP because of its abilities over ASP; but it's not really worth arguing over. Just use what is most compatible with what you have, and fits what you desire most.

About the Author

Paul Avery



  • ashnah php interpreter

    Posted by ashrafull on 01/07/2007 04:51am

    I like php , mysql etc. I have developed a ashnah php interpreter. this can interpret simple php programme. it has built in database, xml, regexpression. you do not have to install mysql to use it. for basic staff it simulate sql database. sound crazy, please have a look and make comment.

  • PHP is a gem

    Posted by steveheflin on 11/08/2006 10:55pm

    Although ASP(.NET) doesn't compare with the power and momentum that PHP has, this article points the reader to PHP and hopefully gets the ASP reader to take a look at PHP.

  • ASP is obsolete, ASP.NET does not compare...

    Posted by tornblad on 11/08/2006 12:05pm

    ASP.NET renders ASP completely obsolete, which is why this article is of no value. Also, pure out-of-the-box ASP.NET is more powerful than anything you could imagine cooking up with pure out-of-the-box PHP. There is complete support for security, authorization, authentication, auditing, localization, modularization... There are standard web user controls that you would have to write from scratch in PHP... You have the ability to apply themes and skins in a easy and standardized fashion without writing a single line of C# or VB.NET code. A more fair comparison would be PHP to Ruby on Rails, or Ruby on Rails to ASP.NET...

  • Why not a compare PHP with Ruby on Rails?

    Posted by dotnetCarpenter on 11/06/2006 03:34pm

    It's not that your arguments is not valid but it strikes me as rather odd to compare a vivid framework like PHP with a framework which latest edition is 6 years old. I would be obvious to compare PHP and Ruby on Rails. You're wrong in the Programming Heritage part. ASP is a framework not a language. You can write ASP pages in JScript, Perl and so on.

    • dotash framework

      Posted by ashrafull on 01/07/2007 04:56am

      I am working on a project to develop a new platform for small office and personal pages. ashnah dotash platformhas following ashnah php interpreter ashnah cpp interpreter ashsql sql server ashnah webserver, ashnah email, ftp,dns server it is a mini php,apcache and mysql combined like xampp. but only one programme for all. please have a look at my ashnah site and make comments

    • Still valid.

      Posted by PeejAvery on 11/06/2006 10:00pm

      Even though ASP itself is older, it is still used. Also, I left my points rather open so that it is pretty much still true for ASP.NET as well. Concerning the Programming Heritage, I am not wrong. I said nothing about it being a language. I stated that it has roots in a language.

  • It no longer worth...

    Posted by hspc on 11/06/2006 03:05pm

    Maybe PHP vs ASP.NET ?

    • Similar

      Posted by PeejAvery on 11/06/2006 09:55pm

      I tried to stay rather basic in my comparing and contrasting. Enough that, for the most part, it works for either ASP or ASP.NET.

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date