What is PHP
PHP represents a "hypertext processor," which means you have to know that it is a server-side processing language and appears in HTML form. Its most commonly used place is the webpage, the data sends from the client to the Web server, the information is processed here and returns the result.
But this universal language is not limited to Web pages, PHP can also be used in command line shell, it can be used as an extension of the operating system, thus executing the corresponding PHP file.
The database application is also a strength of PHP, and MySQL, SQL, Microsoft Access, Oracle, and InterBase are just a subset of the PHP language's database.
What is ASP
ASP is ACITVE Server Pages abbreviation, it is also a server-side scripting language, Microsoft to achieve the effect of dynamic Web pages, integrated into the service provider process, is known as COM (Component Object Models).
Although ASP is not limited to running on IIS (Internet information Services) servers, it is only available on IIS to perform all of its functions, initially supporting the Windows 2000 and NT4 Option Pack for its operating system. Similarly, an ASP can be run on a platform other than IIS, and PWS (Personal Web Server) can interpret ASP code on Windows NT, 95, 98, but features can be limited.
Cost issues
Many people may want to argue about the cost of ASP and PHP, but this is not really a major focus. Most of the users who buy IIS are in order to integrate better with Microsoft products, and then again, IIS is absolutely worthy of the extra money spent.
PHP is free to run its Apache WEB server, which is provided by the Apache Software Foundation-safe, free, and because of this, PHP can be installed free of charge, the only cost is to buy the server running it, and the time cost of installation.
Speed problem
This issue is also in the server-side scripting language, where both sides argue the most intense, since the two languages came to the world, the debate on this issue has not stopped.
In general, after using memory, an application should "return" it to the operating system, as long as the memory is used by the program and the operating system usually does not require it to be retracted. PHP's unique way of using memory makes it an advantage. PHP, after getting a piece of memory, will temporarily hold it, when the memory used up, and did not return it to the operating system, and reserved for the next possible operation. This can be modified in the configuration file.
Because of the COM based architecture, the ASP is a little slower because it calls the object model and the system must load the models, which is somewhat like the programming language that uses the control. 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 the Apache Web server runs on, and if the computer is different, the language on the better configured computer will run faster.
Compatibility thinking
When it comes to compatibility, that's too much, because no two computers in the world have exactly the same hardware and software, and because of this, people want to know how the program works on the devices they already have.
In this context, PHP may have won the first step, it wins the open source, which means that it may have countless developers, better resources, a larger document library, and so on. Because of these factors, the more PHP develops, the more programmers learn.
ASP is generally considered to run only 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 to open mod_perl.
Keep in mind that PHP can run on any platform, Mac os X, Windows, Linux, and Solaris are the operating systems that can run it.
Security Considerations
No matter how safe it may be, everything is compromised, and the only thing lacking is time and resources.
Apache security options make it more secure than the Windows Server operating system, and IIS already has a number of known security vulnerabilities that are being patched and, in comparison, Apache security is obvious.
Programming Ease of learning
ASP is derived from Microsoft's most common language--visual basic, so it is very simple and easy to learn, and PHP is more based on C + + language, which may be part of the reason for its rapid speed.
General misunderstanding of ASP
ASP and asp.net is not a thing at all, ASP.net is a thorough rewrite of ASP programming language, because of this, most of its function is not backward compatible, it is suitable for Microsoft to update. NET architecture.
Conclusion
From a personal standpoint, PHP is faster, safer, easier to use, more compatible, and even cheaper, but it's not that the ASP is worthless. There is no need for further discussion about both, using the language that is most compatible with your system and the one that best meets your expectations.