1, platform has a difference: ASP in windows,php in all systems.
2, the price is different: PHP free.
3, Security: PHP High.
But this universal language is not confined to the web, PHP can also be used in the command line shell, which can be used as an extension of the operating system, thereby executing the corresponding PHP file.
The application of database is also a strong point of PHP, MySQL, SQL, Microsoft Access, Oracle and InterBase are just a subset of the PHP language database.
Although ASP is not limited to running on an IIS (Internet information Services) server, it is only available on IIS to perform its full functionality and the operating system that originally supported it is Windows 2000 and NT4 Optionpack. Similarly, ASPs can run on platforms other than IIS, and PWS (Personal Web Server) can interpret ASP code on Windows NT, 95, 98, but with limited functionality.
The cost issue may be a lot of people want to argue about the cost of ASP and PHP, but this is really not a major focus. Most of the users who purchased IIS were designed to better integrate with Microsoft's products, which, by the way, would definitely be worth the extra money.
PHP and Apache WEB server running it are free, they are provided by the Apache Software Foundation-Secure, free, because of this, PHP can be installed free of charge, the only cost is to buy the server running it, and the cost of installation time.
Speed problem The problem is also the server-side scripting language, the two sides of the most controversial point, since both languages came to the world, the debate on this issue has not stopped.
In general, the application should "give back" to the operating system after it has used the memory, as long as the memory is always being used by the program and the operating system does not normally require recovery. PHP's unique approach to using memory makes it an advantage. When PHP gets a piece of memory, it temporarily retains it, and when it runs out of memory, it does not return it to the operating system, which is reserved for the next possible operation. This can be modified in the configuration file.
Because of the COM-based architecture, ASP is a little slower because it calls the object model, and the system must load the models, which is a bit like the programming languages that use the controls. In terms of memory consumption, it is also comparable to standard applications.
In fact, the biggest difference in speed is the computer that IIS or Apache webserver runs on, and if the computer is different, the language on the better-configured computer will run faster.
In this context, PHP may have won the first step, winning the open source, which means that there may be countless developers behind it, better resources, a larger document library, and so on. Because of these factors, the more PHP is developed, the more programmers learn.
ASP generally thinks that only runs on IIS, as mentioned earlier, this is not very correct, in fact, the ASP can also run on Apache. Apache ASP can run a limited ASP function on any Apache server, all you need to do is open mod_perl.
Keep in mind that PHP can run on any platform, and MacOS X, Windows, Linux, and Solaris are all operating systems that can run it.
Security considerations no matter how high security, anything is possible to be compromised, the only lack of time and resources is the problem.
Apache's security options make it more secure than the Windows Server operating system, IIS has many known security vulnerabilities and has been patched, and the security of Apache is obvious to all.
Programming Easy-to-learn ASP comes from the most common language--visualbasic in Microsoft products, so it's easy to learn, and PHP is more based on the C + + language, which is probably part of the reason for its speed.
General misunderstanding of ASP
The best language for Web development. The difference between PHP and ASP language