By the moment that ASP.Net came to the surface, there has been a long debate among programmers which one is better or not. Since I have used both languages, I will try to do a quick comparison. But lets start with some history first.
PHP traces it roots back to a 1995 Perl application designed to track accesses to Rasmus Lerdorf’s online resume! Two years later, his subsequent open-sourced C implementation of his Personal Home Page / Forms Interpreter – PHP/FI – was installed on 1% (~50,000) of the world’s Internet domains. In 1997 Andi Gutmans and Zeev Suraski do a third rewrite of the C implementation intended for their ecommerce application which was designated as PHP 3.0, a recursive acronym for Hypertext Pre-processor. PHP has now reached version 5.3.x and 6.0 is on the way!
ASP or Active Server Pages is the first attempt of Microsoft to create a server-side language used for generating dynamic and interactive pages. In 2002 Microsoft releases the ASP.NET as a successor to ASP. ASP.NET is built on the Common Language Runtime, which allows programmers to write ASP.NET code using any supported .NET language (C#, C++, J#, Jscript.NET, Python, Ruby, etc). At the moment ASP.NET is at version 3.x.
Here are some interesting comparative details for both languages: