PHP versus Microsoft .NET Platform

May 31st, 2012 | Comment on this post


PHP’s main competitor is the Microsoft .NET Platform and in particular the language ASP.NET.
The data at shows that 77% of all websites are PHP scripted, compared to 21% of ASP.NET websites.

One of my oldest coding friends claims that ASP.NET is the future of server side web development.  He started coding the Microsoft way, learning Classic ASP, then moving to the .NET Framework.  He doesn’t like PHP and sees it more as a language for hobbyists and casual programmers.  Once I pointed out that sites such as Facebook and Wikipedia run on PHP he went quiet!  He says:

  • Unlike PHP, the code in .aspx files is compiled at runtime, making it more efficient
  • The .NET framework offers excellent paid support (PHP does not)
  • Large corporations will not use PHP because it is open-source

Although PHP is my life, I always keep my eye on alternative technologies. As I write this, I have a copy of Visual Web Developer 2010 installed for evaluation purposes.

Would I ever want to learn ASP.NET?  <% response.write(‘No Thanks’) %>


LAMP (Linux, Apache, MySQL and PHP) software is free and so is and IIS if you purchase Windows OS.
There is a substantial licensing cost for a Microsoft Windows Server, Microsoft SQL Server and future upgrades.  If the site becomes popular and needs to run on multiple servers, the licensing costs can be prohibitive.
There are no such costs for a PHP developed website.

Hosting  companies offer more PHP hosting opportunities over Windows hosting, presumably it comes down to demand and the high cost of purchasing Windows server licences.


In my opinion, PHP wins hands down here.  Being community based means that there are so many great resources available.  Open-source developers will readily help you do so not for financial gain.


If you go down the ASP.NET route, you have to use Microsoft’s Integrated Development Editor.
PHP, on the other hand has a variety of suitable IDE’s, such as Notepad++, Netbeans, PHP Developer.


PHP can be run on any platform: Linux, Unix, Mac OS X, Windows.
ASP.NET can only run on the Windows platform.

I can’t see .NET as the future of the internet, but I can see it used by large corporations (Banks), who won’t use open-source software.  Both PHP and .NET are capable for interfacing with a database, sending emails and interfacing with a payment gateway.

For the moment, PHP has the edge.  What do you think?