This debate has raged on ever since Microsoft launched ASP.net and people to this day argue upon which one is better. To me, frankly, this topic is not debatable at all. Why? The following points, a frank comparison between PHP and ASP.net will tell you =)

For starters, PHP (Pre-Hypertext Processor) and ASP.net (Active Server Pages) are both server side scripting languages used over the internet for creating dynamic web applications.

When taking on a project, there are a number of aspects that the owner needs to consider, cost and support being two important ones of those factors.

PHP is open source, free of cost, and with a huge community with open support. ASP.net is a Microsoft product, costs you to have a Windows NT platform, the Internet Information Services (IIS) installed and configured etc.

1. PHP is a relatively simpler language to use than ASP.net. I’ve often noticed that a program written in PHP requires fewer lines of code and steps to follow as compared to ASP.net. Initially, PHP was written in the C programming language to replace a set of scripts in Perl. That is the reason why coding in PHP remains simple even today.

ASP.net, being a relatively new offering from Microsoft, has many options when it comes to languages. Here, you can use languages such as C#, J#, C++ and VB.net. Hence, when it comes to choice, ASP.net has more to offer. But PHP is no less, since it can do its task quite well, even with its minimum language tools. 

2. PHP is has much better support for the database management system, MySQL. In fact, the very popular blogging platform, WordPress (that I’ve employed here at Ammar360.com) uses this strong combination of PHP and MySQL.

ASP.net can also support MySQL, but PHP is the unanimous choice, by the masses and classes alike, for its great support and ease of access for this database management system.

3. Support: When it comes to support, PHP wins over ASP.net. The main reason for this is that PHP is open source. Hence, the support can come freely from all over the world. In most cases, PHP fixes are made instantly.

While, ASP.net could take a while to make fixes. That is because it is owned by Microsoft, and it is the development team of Microsoft that will need to respond to the support query. That could take more time than the worldwide open source support that PHP is able to get.

4. PHP is an open source programming language, which means it is free for anyone to use. Programmers can develop PHP applications virtually at no cost, because PHP is free to use.

ASP.net is not free too, but its extensions are available for free on Windows NT platforms. Hence, ASP.net is available to Windows users when they buy their copy of Windows XP, Windows Vista, Windows 2000, Windows Server 2003. That puts a bit of restriction in its use.

5. PHP is FASTER! ASP.net is compiled into memory in binary code. So, when ASP.net is used for coding, it takes much longer to process since the codes need to be retrieved from memory.

PHP is not compiled into memory like ASP.net is. It is interpreted at runtime. That is the reason why PHP coding leads to better speed and even efficiency.

6. Flexibility. PHP gives you a lot of flexibility and freedom when coding as compared to ASP.net

And of course this article is biased in favour of PHP =P Why So? Because a few people have asked me this question, and I felt like presenting my reasons why I use PHP. It is also because PHP is an older scripting language as compared to ASP.net and that I feel more ‘at home’ with it… I tried having a workable relationship with ASP.net, yes I did! LOL! But it’s okay for projects and having fun or to learn new things, my personal preference would be PHP for several reasons!

This is a never-ending debate for those who want to debate, I just told you guys why I prefer PHP!

Good day! =D