The answer is very simple. Unless you are using Zend application
server, PHP is an interpreted language, and ASP.NET is a compiled one.
The only exception to that is the Caucho Resin PHP interpreter which has you put PHP files into a .war (web archive)
You can still swap out PHP files while Resin is running, but it is still a pain.
ASP
used to be a server side only language where COM was infrequently used.
Now they have copied the Java web beans architecture, and it is just as
painful to code for as Tomcat.
They decided to do this back in the late 90s when Sun Microsystems sued
them and told them they could not use Native Java extensions in with
Windows UI in the MSJVM.
Anders Hejlsberg, co-author of MSJ++ and WFC set out to copy not only J2EE, but Java beans and the Tomcat architecture as well.
Where you have the Java Bean/Servlet (.NET assembly/Code behind) and the Java server Page(ASPX page)
Real
time changes and XDebug are priceless to developers for RAD development
and deployment. Simply redeploying a .NET application is painful
compared to a VIM change on a PHP file. Also, most PHP functions are in the global namespace. Thus making looking up reference documentation obsolete in Eclipse PDT which shows you the function description and paramters automatically in a code detecting mechanism similar to what Microsoft calls intellisense.
Because of the package import segregation, it does not work that way with Java, and hence neither with the .NET clone.