Home / Articles / Programming languages / The developers dilemma - how to choose between PHP and ASP.NET

The developers dilemma - how to choose between PHP and ASP.NET

The developers dilemma - how to choose between PHP and ASP.NET
The developers dilemma - how to choose between PHP and ASP.NET
  • Currently 3.5 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Rating: 3.5/5 (9 votes cast)

Thank you for rating!

You have already rated this page, you can only rate it once!

Your rating has been changed, thanks for rating!

Log in or create a user account to rate this page.

When given a task to develop a website or web application, there is one confusion that even the most experienced programmers have to face - the choice of language. Two of the most obvious choices are PHP and ASP.NET. However, both have a huge following and every programmer has his/her own opinion depending on their experience and preferences. So, you too must make a choice based on your preferences.

It is not possible to give a definite answer but this article will help you identify and set your preference in order to make a choice that is better for you and the project. So, let's start with the basic ones first.

Platform & server

This is definitely one of the major differences and you may already be aware of it. PHP is platform independent and you have complete freedom to run it on Linux, UNIX, Mac OS or Windows. ASP.NET, on the other hand, is limited to Windows platform. So, it actually loses the open source advantage here - the low cost and highly supportive community.

Speed & performance

Most programmers argue that there isn't any real difference in performance and speed. This is true as long as you are working on smaller or less complicated projects. Yet, in case of bigger web applications that require some enormous tasks to be performed, programming language can affect the speed to some extent. Again, the choice varies from task to task.

Let's take a look at a few examples here:

  • Starting with the simplest task, the application has to access the database, process a query and output the result to the browser via server. Programming language hardly makes much difference in speed of this process, but the database servers and queries may have an impact.
  • Running an application on Linux or UNIX gives you the advantage of saving your precious resources that are consumed by the GUI and extra packages in case of Windows. Naturally, you will have more free resources on hand.
  • When it comes to accessing the file system to find and send the image to the server, PHP might perform better but again this is only due to Linux and the ext4 file system surpassing Windows OS and NTFS.

Development, installation and deployment

Most programmers who have experience with both languages will agree that development on ASP.NET takes more time. First of all, it requires more line of code and secondly needs to be compiled after every single modification.

In terms of installation and deployment, ASP.NET offers more ease due to its endless features of Windows OS. However, Linux is also catching up with its newer versions that are simplified and streamlined for better usability.


It may seem like we are advocating PHP here but let's not forget that ASP.NET is the real winner with its extendibility. It uses C# that is inheritably a better language than PHP and offers unmatchable object-oriented support.

Finally, make a choice that is well suited to your skills, experience and of course, client's requirement. Get your hands on both languages and find out the one you are most comfortable with. Use best practices to optimize the code and process, and you will be able to work perfectly well on any platform you choose.

Read also

What is PHP?

What is PHP?

Classes and objects in PHP

Classes and objects in PHP

How to access classes and objects in PHP

How to access classes and objects in PHP

Discussion (total 3 comments)

Carlos C Soto
February 18, 2014 at 01:04 pm
asp.net or even other webapplications based on C# can run under linux using mono. 2 of your 4 points needs review.
The main issue could be: what kind of application you will make. Is it a well designed app avoiding antipatterns? Php will make your live hard when you try to design good object oriented patters because the OO implementation is partial (like classes scope or importing a complete namespace).
February 18, 2014 at 01:07 pm
i have thought a new idea based on php.
You willl have detail here just follow.
Let me know how you are thinking on it?
Jan Reilink
February 19, 2014 at 03:07 am
+1 for Carlos C Soto's reply. Too biased article or too little research.

Log in or create a user account to post a comment.


Quick navigation

General navigation