Home Backend Development PHP Tutorial On PHP in the Web 2.0 Era: Advantages or Problems? _PHP Tutorial

On PHP in the Web 2.0 Era: Advantages or Problems? _PHP Tutorial

Jul 15, 2016 pm 01:26 PM
php advantage era advent of programmer still question along with

With the advent of the so-called WEB2.0 era, programmers have never received as much attention as they do today, and the debate among many programmers about languages ​​has never been as fierce as it is today, such as JAVA, C++, PHP, ASP, etc. Wait, recently another Ruby came out, plus Python. Countless FANS are arguing in the middle, that is, on the Internet, if it is in real life, it will probably be like what is described in "The Legend of Heaven and Dragon Sword", where they will fight Guangmingding to determine the outcome, or determine the number one in the world. A sect. Now it is actually very convenient to determine who is the best in the world. Just look at the number of disciples under which language. The most popular statistical method now is Google. If you look at Google’s search results, you can basically judge its usage on websites on the market:

There are about 5,760,000,000 items that comply with php Query results

There are about 3,070,000,000 query results that are in line with asp

There are about 976,000,000 query results that are in line with java

About 327,000,000 perl-compliant query results

About 238,000,000 python-compliant query results

Approx. 225,000,000 c++-compliant query results

About 176,000,000 ruby-compliant query results

PHP in the Web 2.0 era: still quite Loved

During this period, Ge You’s bald head was frequently exposed, and he always kept telling us one truth - the card that is used by more people is a good card. And if we apply the words of this bald star, that is, I believe in the people. From the results of the above query, you can see that the people love PHP very much.

But if you ask some senior developers on the Internet, who is better among PHP, ASP and Java? Generally speaking, this person will tell you that you don’t have to think about ASP, it is produced by Microsoft. Rubbish, PHP and Java are good choices. Java is suitable for large projects, and PHP is suitable for doing short and fast things. If you continue to ask, and the expert has not lost his patience, he will probably say that eBay, the largest interactive platform in the world, is written in JAVA, and CHINAREN, the largest community in China, is also written in JAVA, and many small The website was initially based on PHP, but later it had to be changed to JAVA for various reasons. This feeling is like saying, if you want to learn martial arts so that you can go out and kill people, or make a name for yourself in the world, then you don’t need to practice Marching Boxing. This thing is used by the government to strengthen the body, the Five Tigers Broken Door Knife. This thing is more than enough for you to deal with ordinary gangsters, but you will give up when you encounter a top master. Java is a bit like Tai Chi. The most popular martial art of SUN, one of the largest martial arts sects today, is the best choice for defeating masters. Therefore, many people believe that PHP is a low-level martial arts, and the best results from practicing it are to give If you look at the casino, you can become a martial arts leader only if you master Java.

When I chatted with technical managers of many companies, the managers said that many people have this mentality. He uses Java, and if you ask him to write PHP, many people will feel insulted. I either feel that the manager doesn't take him seriously, or I'm wondering when I offended the manager and was sent to a remote place like PHP. The larger the company, the more difficult it is to develop PHP projects. This makes many technical bosses very depressed, but it is also very strange. So, below, let’s analyze the formation of this language that is recognized by the people but not favored by many developers-PHP.

PHP before Web2.0: The reason for its popularity

PHP entered China in 1998 or 1999. When it entered, the typical early application was Chinaren alumni. There are also many interactive applications. It is easy to develop and has good fault tolerance, and it has quickly become the choice of many websites. In 2000 and 2001, during the Internet bubble, many websites were developed using PHP. Its popularity is due to the following reasons:

Compatible with C syntax, easy to master

In this regard, it ensures a stable source of developers. Basically, everyone who studies computer science has learned C language, so they can master it quickly in about one to two weeks. New language, and then with simple guidance, you can start initial development work. In terms of the development of the program itself, there is not much difference between a programmer who has been writing for more than three years and a PHP programmer who has been developing for more than half a year.

It runs fast

On the Internet, speed is a very important issue. In this regard, even people who are very disdainful of PHP have to admit that PHP The running speed is quite satisfactory, but since there is no very practical data, it is just the feeling of many people, so there is no very strong evidence to prove this.

Very strong fault tolerance, very good robust performance

Many people who write PHP should feel this way. For example, you apply for a variable in PHP , it can be used as a number, it can be used as an array, or it can be used as a string. Sometimes I wonder how it can ensure efficiency with such a casual style. I can only say that the person who wrote this language compiler is really incredible.

Rich functions and simple operations

If you can think of some operations that are not too rare, you can basically find a function library to solve them. The typical one is to read the contents of the file. Read a variable, so far, I know only PHP seems to provide a dedicated function to solve this problem.

PHP in the Web 2.0 Era: Advantages Become Problems

The above four characteristics are very common for developing programs with PHP, but as a program, these look The features that seem very good have also caused some problems with PHP, resulting in a low evaluation of it by many senior programmers.

First of all, the first one is something that embarrasses many senior programmers. They have been PHP programmers for more than 3 years. When a beginner asked them some tips, they suddenly discovered that PHP There is really nothing good to say about this language. You can solve the problem by looking at its help or taking a look at the tutorial. Unlike Java, there is a fundamental difference between a Java developer who has only been writing for about half a year and a Java developer who has been writing for more than 3 years. The latter can talk about a lot of JAVA development architecture and distribution issues, and the rookie who talks about it is full of confusion. Full of adoration. When I was giving lectures at PHPCHINA.CN, I found that everyone was drowsy when listening to some very detailed things in the PHP language, and most of them were deserting. I think this has a lot to do with the fact that PHP language is easy to understand and there are no challenging concepts.

The second point is still about efficiency. Regarding the efficiency of WEB languages ​​on the market, PHP is just a perception. There is no very powerful test to prove that it is much faster than other languages. However, there is a very famous test performance comparison between JAVA and ASP.

Some people have done experiments to conduct loop performance tests and Oracle database access tests for these three languages. In the loop performance test, JSP used a loop of 20000*20000 for a total of four seconds. The ASP and PHP tests were 2000*2000 loops (one order of magnitude less), which took 63 seconds respectively. The PHP test is 2000*2000 loop for 84 seconds. In the database test, the three perform 1000 Insert, Update, Select and Delete on Oracle8 respectively:

JSP takes 13 seconds

PHP takes 69 seconds

ASP takes 73 seconds

An interesting test illustrates a problem. For a large number of operations, PHP It does not seem to be a very successful language. This is also a practical example that many experts are not very optimistic about PHP. However, the reality is that this is just a bit of a BT test. Who would write a loop on the Internet that lasts more than 4 million times? Request an application, I'd love to see it. In fact, such loops or intensive operations are very rare in WEB applications. If there are, the first thing to consider is the optimization of the algorithm and reducing the number of loops, and then the language itself. And even if it is necessary, it cannot be solved by Java, PHP and ASP. At this time, if it is used more, C will appear. If it is more used, assembly can be used. In many cases, the design of the chip is A better choice would never be the turn of a language like Java, so it is very inappropriate to use this method to evaluate PHP.

PHP in the Web 2.0 era: What is the future?

As for the better robustness in PHP development, it can run no matter how you write it, and it is very stable, which also causes PHP programmers to be unorganized, and the development of programs is very casual. Due to the urgency of Internet product development in China, there is almost no good documentation, so the maintenance of PHP programs in the later period has become a nightmare for countless project managers. This is also where many experts or senior programmers have a low opinion of PHP. When many project managers need to standardize development, they find that there is no way to standardize it. Java has Struts, MVC... but PHP lacks a system. The development architecture makes it difficult for PHP to become the choice for enterprise application systems.

As for the rich function operations, this is probably the only thing that has not been criticized, but Java, ASP and Perl all have very rich functions. PHP does not have a huge advantage in this regard, so it just becomes A not-so-important reason to choose it.


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/446604.htmlTechArticleWith the advent of the so-called WEB2.0 era, programmers have never received as much attention as they do today. Many programmers The debate over language has never been as fierce as it is today, JAVA, C++, PH...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1666
14
PHP Tutorial
1273
29
C# Tutorial
1252
24
PHP and Python: Comparing Two Popular Programming Languages PHP and Python: Comparing Two Popular Programming Languages Apr 14, 2025 am 12:13 AM

PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

PHP: A Key Language for Web Development PHP: A Key Language for Web Development Apr 13, 2025 am 12:08 AM

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

PHP in Action: Real-World Examples and Applications PHP in Action: Real-World Examples and Applications Apr 14, 2025 am 12:19 AM

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

PHP vs. Python: Understanding the Differences PHP vs. Python: Understanding the Differences Apr 11, 2025 am 12:15 AM

PHP and Python each have their own advantages, and the choice should be based on project requirements. 1.PHP is suitable for web development, with simple syntax and high execution efficiency. 2. Python is suitable for data science and machine learning, with concise syntax and rich libraries.

The Enduring Relevance of PHP: Is It Still Alive? The Enduring Relevance of PHP: Is It Still Alive? Apr 14, 2025 am 12:12 AM

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.

PHP and Python: Code Examples and Comparison PHP and Python: Code Examples and Comparison Apr 15, 2025 am 12:07 AM

PHP and Python have their own advantages and disadvantages, and the choice depends on project needs and personal preferences. 1.PHP is suitable for rapid development and maintenance of large-scale web applications. 2. Python dominates the field of data science and machine learning.

PHP vs. Other Languages: A Comparison PHP vs. Other Languages: A Comparison Apr 13, 2025 am 12:19 AM

PHP is suitable for web development, especially in rapid development and processing dynamic content, but is not good at data science and enterprise-level applications. Compared with Python, PHP has more advantages in web development, but is not as good as Python in the field of data science; compared with Java, PHP performs worse in enterprise-level applications, but is more flexible in web development; compared with JavaScript, PHP is more concise in back-end development, but is not as good as JavaScript in front-end development.

PHP and Python: Different Paradigms Explained PHP and Python: Different Paradigms Explained Apr 18, 2025 am 12:26 AM

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

See all articles