A lot of people like PHP: On the WEB 2.0 times PHP status

Source: Internet
Author: User
Tags php language php and query oracle database

With the advent of the so-called WEB2.0 era, programmers have never been the same as today's attention, many programmers on the language of the controversy has never been as fierce as today, JAVA, C + +, PHP, ASP, and so on, recently came out a ruby, plus python. Countless fans in the middle of the debate, that is, in the network, if it is in the real life, probably will be like "against the sky" in the description of the Dragon, will battle the bright top to set a victory or defeat, or a promise of the world's Gate faction. And now set out who is the largest in fact very convenient, see which language of the number of disciples can be. And now the most popular statistical way, is Google, look at Google's search results, the basic can determine the use of their website in the market:

    1. Approximately 5,760,000,000 PHP-compliant query results
    2. Approximately 3,070,000,000 items that meet ASP's query results
    3. Approximately 976,000,000 Java-compliant query results
    4. Approximately 327,000,000 perl-compliant query results
    5. About 238,000,000 query results that match python
    6. Approximately 225,000,000 query results that conform to C + +
    7. About 176,000,000 matches Ruby's query results

This time GE the light head frequently exposes, always chatter tells us a truth--uses the person many card is the good card. And if you apply this bald star, that is, I, believe the masses, from the results of the above query you can see that the people are very love PHP.

But if you ask some of the Internet's senior developers, PHP, ASP and Java, who is better between them? Generally speaking, this person will tell you, ASP don't think, Microsoft out of garbage, PHP and Java is a good choice, Java suitable for big projects, PHP is suitable to do some Chanping things. If you continue to ask, the master has not lost patience, he will generally say, you see the world's largest interactive platform ebay, is written in Java, China's largest community Chinaren alumni is also Java, and many small sites, initially are PHP, Later, all kinds of reasons must be changed to Java. This feeling is like saying, if you want to learn Kung fu to go out and chop people, or in the Lake of fame, then March boxing you do not have to practice, this thing is the government to take out the physical body, five tigers broken door knife This thing you used to deal with the General Rogue is more than enough, but meet the extreme master you will rest. And Java is a bit like Taijiquan, today the largest door faction of the martial Arts sun, is the most important to the negative master choice, so many people have decided: PHP is inferior martial arts, practice to the best results is to see the casino, only to learn Java can do martial arts master.

When I was talking to a lot of company technical managers, managers say a lot of people have this mentality, he is using Java, and if you let him write PHP, many people will have a feeling of insult, not feel that the manager does not value him, is thinking about when he offended the manager, have been sent to PHP this remote small place to go. The more big companies, the more difficult the PHP project to carry out, this let a lot of technology bosses are very depressed, but also very strange. So, below, we analyze the formation of this by the people recognized, but not by many developers optimistic about the language--php.

PHP into China is 98, 99, enter the time, the initial application of the typical is Chinaren alumni, there are many interactive applications, it to the development of convenient, fault-tolerant, quickly become a lot of Web site choice. By the time of 00, 01, when the dotcom bubble, a lot of PHP completed the development of the site, it's popular for several reasons:

C-compatible syntax, easy to master

In this regard, it ensures the stability of the source of the developer, basically, each computer-learning personnel, not without learning C language, so can be in a week or so quickly grasp the new language, and then through simple guidance, can start the initial development work. From the development of the program itself, the programmer who has written more than three years, and the PHP programmer who has developed more than half a year is not too different.

Run the Fast

On the Internet, speed is a very important issue, this is timely for PHP is very dismissive of people also have to admit that PHP has to run the speed is relatively satisfactory, but because there is no very practical data, but a lot of people feel, so this point, there is no very strong evidence to prove.

Very strong fault tolerance, good robustness

A lot of people who write PHP should have this feeling, for example, you apply a variable in PHP, do numbers, do arrays, and do string. I have always wondered how he can be efficient in this casual style, and that it's amazing how people write this language compiler.

Rich functions and simple operations

Can think of some operations, if not too rare, you can basically find a function library to solve, typically read the contents of the file read a variable, so far, I know that only PHP provides a special function to solve this problem

The above four features, with PHP development program is very common, but as a program, these look very good features also form a number of PHP problems, resulting in a lot of senior programmers on the low evaluation.

First one, also let a lot of senior programmers embarrassed about it, did more than 3 years of PHP programmers, when a beginner asked some of their skills, they suddenly found that the PHP language is really no say, see its help can solve the problem or take a look at the tutorial. Unlike Java, a Java developer who has only written about half a year and more than 3 years of Java developers can say that there is an essential difference, which can speak a lot about Java development architecture and distribution issues, the rookie of the talk is full of brain paste, face worship. While I was lecturing in phpchina.cn, I found everyone was sleepy when listening to some very detailed things in the PHP language, and most of them were deserting. I think this and PHP language is easy to understand, there is no challenge to the concept of a great relationship.

The second one is the question of efficiency. On the market for the efficiency of the Web language, PHP is just a feeling, and not a very strong test to prove that it is much faster than other languages, and Java and ASP has a very well-known test performance comparison.

Experiments have been done to perform cyclic performance testing and access to Oracle database tests for these three languages. In the cyclic performance test, JSP uses a 20000*20000 loop for a total of four seconds. And the ASP, PHP test is the 2000*2000 cycle (one less order of magnitude), respectively, in 63 seconds. PHP tests the 2000*2000 loop for 84 seconds. In the database test, the three Oracle8 are insert,update,select and delete 1000 times respectively:

    1. JSP takes 13 seconds
    2. PHP takes 69 seconds
    3. ASP takes 73 seconds

An interesting test to illustrate a problem, for a large number of operations, PHP does not look like a very successful language, this is also a lot of pros are not very optimistic about a practical example of PHP proved, but actually this is just a little BT test, Who will write a cycle of 4 million times on the Internet request application above, I would like to see. In fact, this kind of loop or dense operation is very rare in Web applications, and if so, the first consideration is to optimize the algorithm, reduce the number of loops, and then consider the language itself. And even if it's necessary, also not Java, PHP and ASP can be resolved, this time, if the use of more, C will be on the go, a little more, you can use the assembly, a lot of circumstances, chip design I think is a better choice, how will not turn to the Java language, So it's very wrong to evaluate PHP in this way.

And for the better robustness in PHP development, how do you write it can run, and very stable, which also caused the lazy PHP programmers, the development of the program is very casual, coupled with the Chinese Internet product development of the emergency, almost no good documentation, so that the later maintenance of PHP programs become countless project managers nightmare. This is also a lot of experts or senior programmers for PHP evaluation is very low place, and when many project managers need to standardize development, but also found that there is no specification, Java has struts, MVC ... But PHP lacks the system development architecture, thus also becomes PHP difficult to become the enterprise Application system choice.

As for the rich function operation, this is probably the only place that has not been criticized, but Java, ASP, and Perl have very rich functions, PHP does not have a very big advantage in this point, so just become a choice for people it is not a very important reason.



Related Article

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.