Overview: Comparison between ASP and PHP
Active Server Pages (ASP) is Microsoft's scripting technology for displaying dynamic web pages, ASP programmes mostly use VBScript, JScript. PHP on the other hand PHP is the open source alternative to ASP that runs on multiple operating systems, incuding Linux, Windows solaris and other OS.
Speed PHP is relatively much more faster and stable than ASP, ASP is built on a COM-based architecture so when ever a program tries to connect to a database or he calls a COM object there is an overhead on the server, All this COM overhead adds up and slows things down.
Under PHP, everything runs in PHP's memory space. This means that PHP code will run faster because there is no overhead of communicating with different COM objects in different processes. Again ASP is slower and more memory intensive applications than PHP's model because each ASP language compiler runs in its own process.
Price PHP installtions are definetly cheaper to install, PHP runs great on Linux which is free, on the other hand ASP runs on the IIS Server (Internet Information Server) which need's Windows N.T/2000/2003 Servers.
Apart from that ASP mostly uses MS-SQL Server as the back end which again is expensive, Where as PHP programmes mostly use MySQL which is again FREE!
No Hidden Cost With ASP if you need to upload files, then you would need a third party component like ASPuplod, similarly if you need to send mail you need another component and so on.
In PHP common tasks like ftp, encrypt passwords in MD5, or send email from a web page all are built in no hidden cost, and as PHP is Open source there is a lot of free code available for PHP.
Cross Platform compatablily As stated earlier PHP programms run on Unix, Linux, Solaris and Window's with ASP you are mostly stuck with Windows.