Seven reasons why PHP is better than ASP-Linux Enterprise applications-Linux Server Applications. Asp is a technology that Microsoft implements dynamic web pages. Asp supports some scripting languages, mainly vbscripp. Compared with asp, you can also choose another open-source programming language, php, which can run on multiple operating systems, including linux and windows.
Although asp is a good technology, I believe that php will do well in the future in terms of technology in the long term.
I think there are seven reasons why php is better than asp:
1. speed, speed, and speed
When I ran the php script program for the first time, I couldn't help but say to myself: "It's too fast." At that time, I ran my program on a 166mhz machine, however, the running speed is still very fast.
Asp is never as fast as php, because asp is built on the com architecture. When Using vbscript to write an asp script, actually com objects are used. When sending information to a user's browser, it uses the write method of the response object, when it accesses the database and file system, it uses other com objects. The use of these com objects reduces the running speed.
In php code, all the work is run in the php memory space. That is to say, php is not based on com objects, so it runs faster.
The following is the execution time statistics of a query statement that we run 40 times in mssql7:
Php querying mssql7 time (seconds)
Use mssql extension 01.88
Odbc extension 09.54
Odbc via com (ado) 17.28
Use oledb via com 06.19
When we use php. odbc, it takes 9.54 seconds to access the database, and it takes 80% seconds to connect to the database using the com interface.
Oledb is Microsoft's high-speed database access technology, which is faster than odbc. However, when we tested the efficiency of php and oledb, the result was that the overall performance of php was 200% higher than that of oledb. Therefore, we came to the conclusion that if we didn't use com, we could get a faster execution speed.
Of course, php is not the fastest to execute, but we are just getting started, we will gradually improve it, and php is an open source programming language, many programmers in the world are constantly improving his technology. I believe that he will certainly get a higher execution speed than non-open source code systems.
2. Advanced Memory Management
In iis4, an asp script header. asp. If it is contained by 20 pages, these 20 headers are retained in the memory during running. iis5 solves this problem, but only windows2000 supports iis5. This iis5 is not backward compatible, many servers still need low-level memory management under iis4.
In php, this problem does not exist. Only when require is used can an include file be called.
3. No worries
One thing I hate very much is to buy an uneasy product. For example, if you buy a car, but the engine is bad, you need to replace it; when you buy a house, you need to repair the roof that leaks.
The asp old products are the same. After you buy asp, If you need encryption technology, you need to buy aspencrypt; when you need email management, you need to buy serverobjets qmail; when you need to upload files, you need to buy artisans sa-fileup.
4. mysql makes php more exciting
The combination of php and mysql is simple and exciting. Php has many mysql management and maintenance tools, and the most comprehensive support for mysqk. Many useful functions, such as mysql_insert_id and mysql_affected_rows, do not exist in other databases.
Asp and php are ideal solutions for medium-sized websites, but the close combination of php and mysql makes php more advantageous.
Mysql is faster than microsoft access, and mssql and oracle are faster than mysql, but the cost is high.
5. Change java and c ++ into a style
This advantage is just an opinion.
I know that you will not believe that a visual basic programmer will turn to php because php has java and c ++ programming styles, however, you will believe that many people still like java and c ++. php is a language that is easier to learn with the programming style of these two languages.
Php supports structured programming. In vb, there are still few classes for its inheritance. The inheritance of php like java and c ++ makes a large program full of class shadows everywhere.
6. Handle bugs
Have you ever asked microsoft to modify some asp bugs? If you are not a boeing-like organization, you cannot quickly and appropriately modify it. If you stop working when a bug occurs, you will not be able to continue your work.
Php: When you discover a bug, you can modify it. If you do not have the expert level, you can ask the experts to modify it, and your modifications will be accepted and recognized by the open code organization.
7. Portability
Microsoft often modifies asp. The next version is asp +. Now the test has started. I believe they will modify many of the issues I have mentioned before. But there is no doubt that microsoft will limit you to the scope of their products.
I used to be a programmer on an Apple Computer. When Windows 95 was launched, I started to change. However, many original codes cannot be run on Windows 95. These codes are now put aside, I am very sorry. So I don't want to see such a tragedy in windows.
Don't forget that novell was once as popular as microsoft's network operating system, but no one is using it now, So microsoft will.
I found php and I still work in windows, but I am comforted to know that php code can run in solaris, linux and many other operating systems.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.