Seven advantages of PHP

Source: Internet
Author: User
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 a technology that Microsoft uses to implement dynamic web pages than ASP. 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.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.