When one talks of web pages and in particular dynamically generated web pages, the terms ASP and PHP are relevant. ASP stands for Active Server Pages and it is the first server side script engine designed by Microsoft for dynamic web pages. PHP, which is also a server side scripting language, was designed by Rasmus Lerdorf, primarily as a competitor to Microsoft's ASP. Originally, PHP stood for Personal Home Page but now it stands for Hypertext Preprocessor.
ASP functions through the IIS i.e. Internet Information Services. ASP technology uses VBScript and Jscript but also supports other scripting languages. The scripting language you choose can be enclosed within delimiters when using ASP. Having been developed by Microsoft, ASP works best on the Microsoft operating system, though it can also be used on other operating systems such as Linux. PHP runs on C and Java Script. It is supported by most web servers, including IIS. It can be used on all major operating systems such as Linux, Microsoft Windows, OpenBSD and Mac. While ASP mainly enables output in HTML format, PHP also supports other formats like images, Flash movies and PDF files. PHP comes with many tools and upgrades and can be easily installed with these. ASP would require registration and payment for various components and upgrades before they can be used. ASP is based on COM or Component Object Model, which is an overhead for the server. On the other hand, the PHP source code makes it a faster script engine. Code optimizers can be used to improve the performance of the compiled code.
Though they share certain common features, there are a number of differences between ASP and PHP. While the choice of one or the other depends on the user, PHP is more widely used today, perhaps on account of its compatibility and efficiency.