ASP and PHP are both programming languages that are commonly used to create websites.
Both ASP and PHP are languages used to build Dynamic Web sites that can interact with Databases and exchange information.
To run ASP programs one needs IIS installed on a Windows platform server, which is not free. PHP programs run on Linux, which is free.
If we compare the speed of ASP and PHP then PHP has an upper hand. PHP code runs faster than ASP. ASP is built on COM based architecture, which is an overhead for the server whereas PHP code runs in its own memory space.
PHP programs can run on various platforms like Linux, Unix, Windows and Solaris whereas ASP is mainly associated with Windows platforms. However, ASP can run on a Linux platform with ASP-Apache installed on the server.