Well, yes both ASP and PHP do basically the same thing. Both are server side scripting language that has the capability of complex programming, that normal client side languages like, javascript or html lacks. But it is not exactly orange to orange comparasion. First thing is, ASP and PHP are both designed to natively run on different web servers. There have been attempt to several benchmark tests that seem to suggest that php does better in performance than asp. But this is plain silly in my opinion.
ASP is a microsoft product. And microsoft web server is IIS. To run PHP on an IIS server, you have to install it seperately, so ASP will always perform better on a windows based IIS server because ASP would be seamless with IIS. On the other hand If a web master is using Apache server, PHP is the way to go. Any ASP module for Apache will likewise suffer performance issues over PHP.
Microsoft applications, naturally, prefer other Microsoft applications whenever possible, so if a webmaster is using a MS platform, he is most definitely gain the best performance using ASP with it and making sure his firewall and VS software are all okay. Also it will relieve you from any incompatibility issue. You know microsoft products are very notorious on who it works with.
On the other hand, 67% of webservers in the net are running Apache and 21.5% are running Microsoft web servers. As I said, usually Apache servers run PHP and IIS run ASP.
That's a survey over 50.5 millon servers on the net. The survey results are from [http://news.netcraft.com/archives/web_server_survey.html.Now] this combination works pretty well because aside from technical issues, apache and php both are open source and are tweakable to any degree because the source code is available!
Many says that ASP's collection routines make database access so much more convienient than any other language.However, using function libraries (you can download many from internet for free), one can have a handful of solutions that make data access componets every bit as easy as with ASP. And php is lot easier to learn if you are a newbie.
I did not want to learn asp because
1. I did not have any attachment to programming languages like VB from before, so asp would not have given me any extra edge in learning it.
2. ASP has no functionality by itself. You need a new COM DLL for every little task. (ie: sending a mail in PHP is a native function and you need a third party DLL for ASP)
3. ASP is not free nor open source. Which means I have no warranty I will be able to use ASP in the future.
This is what I heard from asp haters.:)
a. The strong dimensioning requirements for arrays in ASP tends to disallow alot of creativity in your coding.
b.PHP allows to code freely. One is not bound to hard and fast rules.
c.Microsoft didn't take ASP as far as they could have.
Anyways, ultimately, aside from the personla preferences, neither language has significant performance difference on a correctly configured server, they both have favourite Operating sustems and and favourite database management systems. Like php does particularly well with mysql database.Although, it can work with Adabas D Ingres Oracle (OCI7 and OCI8), dBase InterBase Ovrimos , Empress FrontBase PostgreSQL, FilePro (read-only), mSQL Solid, Hyperwave Direct MS-SQL Sybase, IBM DB2, MySQL, Velocis, Informix, ODBC, Unix dbm. But php does best pairing with mysql.
Note: PHP can be used on all major operating systems, including Linux, many Unix variants (including HP-UX, Solaris and OpenBSD), Microsoft Windows, Mac OS X, RISC OS, and probably others. PHP has also support for most of the web servers today. This includes Apache, Microsoft Internet Information Server, Personal Web Server, Netscape and iPlanet servers, Oreilly Website Pro server, Caudium, Xitami, OmniHTTPd, and many others. For the majority of the servers PHP has a module, for the others supporting the CGI standard, PHP can work as a CGI processor.
_________________
Dust fills my eyes / Clouds roll by / and I roll with them / Centuries cry / Orders fly / and I fall again
Afford best design, implement best solution. Outsource your web design.