Why do you know that PHP is the most brutal black?

Source: Internet
Author: User
Keywords Php java 222 web xml
In the programming topic often see black PHP, but also ranked black most forward. PHP and Java have learned, with the feelings of the web, PHP is very convenient to build, a lot of methods directly use, Java XML configuration is rather verbose, not surprising? 222

Reply content:

As an old driver with more than 8 years of experience in PHP programming, objectively speaking, in the field of web development, PHP is a very good language, the fact that the people will not be transferred. PHP has its shortcomings, but it has continued to improve and develop.

If you have noticed the "Tiobe World Language Rankings", PHP was ranked even before, 2010, once ranked 3rd place, and now probably in 6th place (February 2016).

The decline in the ranking of the language, the individual believes that not because the use of less people, but the domain is more subdivided, such as the new mobile development, has changed the proportion of many programming languages.

PHP is simple and easy to learn, such as:
(1) Shielding the memory management, pointers and other complex language features.
(2) Even shielding the complexity of variable types.
(3) The Environment of PHP is very simple to build.
... ...

What kind of things can be impressive to remember?
For many years old programmers, we have studied in the University of "assembly language", how many can remember? (assuming you're not involved in a job or C + +, if you're not involved in development, how much do you remember?)
However, if you learn php people, usually can remember a lot, because the basic syntax of PHP there is no more than a lot of things ha!


simple things, usually not easy to be forgotten.

In the early days, many people criticized the language features of PHP as incomplete, such as no namespace (Namespace), earlier PHP4 said object-oriented is incomplete, and so on. Others, criticizing weak types, believe that the invisible conversion of variable types brings a lot of pits, in fact, it is likely that they do not have a more comprehensive understanding of the rules of conversion. However, with the development of the php5.x series, there has been little criticism of the language feature level, as it has gradually perfected this piece. Then, the criticism of performance began to increase, but with the release of PHP7, performance was greatly improved.

A simple, yet constantly self-perfecting thing, is usually not abandoned by the tide of the times. There are only two languages in the world, one is often scolded, the other is no one. After I wrote a 1000-word draft, I found it was PHP, not PhD. Many people spray, one is not understanding, in order to spray and spray. Secondly, the sour grape mentality.

PHP Developer Community Style is very robust, from PHP4 to PHP5, and then to PHP7, and even the PHP6 version of Childbirth, PHP this all the way down, the language itself in a steady progress, while the backward processing is very good. So the whole community can same strain development.

PHP6 eventually did not publish, but its core functions were also migrated to the php5.x version.
The latest release of the PHP7 version, it is also amazing. The effect of my own actual deployment, the whole system only made a line of code changes, the seamless migration to the PHP7 version, the system load directly to the decimal. This is productivity.

I believe that the popularity of PHP7 will be very fast, because it will bring great benefits to the manufacturers: performance improvement, can reduce the machine, reduce manpower, system stability is better, also can bring more revenue.

PHP's Manual, commenting system is also very perfect. Many people black PHP just stay in the early concept. PHP is a historical burden, there are inconsistencies in the place. But each language has its own shortcomings.

It is the person, not the language, that decides the program gracefully.

===================2016 January 26 Night Supplement =====================
I did not expect a lot of people to praise, and then add my own experience of using PHP:

University has learned a lot of language, but ultimately still learning php more fulfilling sense, should be and application layer contact relatively close, make something someone use, and then the site just started popular, with PHP to do a website, do a chat room, a forum, is a sense of accomplishment. This has always been the use of PHP.

Here, tell me why PHP was sprayed. Because PHP is easy to get started, so the level of practitioners, plus the PHP language itself is more flexible, lack of language level constraints, so it led to a variety of different ways of writing. Plus the popularity of all kinds of PHP open source software. These softwares are so popular that they ask why they write, and the answer is this: so-and-so software is written. So this is actually caused by the PHP code is generally chaotic phenomenon. But this is more than 10 years ago, the new version of the PHP syntax is more rigorous, the function of OOP is also more and more perfect, as PHP can write simple and elegant code out. So this time again to spray PHP, in fact, out.

In 2004, I took over an old website with team members. Really realize the PHP code if there is no good organization to bring the confusion. At that time index1.php index2.php index3.php, a pile of papers. After a few months, the original business logic was sorted out and then re-implemented. The 04 was also primarily process oriented, when the smarty was used to do the separation of pages and applications. Later, although left, but it is proud that our team at that time for the site has laid a good foundation, this site has also been very good development.

Then joined a domestic first-line internet company, began to do development. Took over an old system, which once brought the company tens of millions of annual revenue system, is the normal PHP, MySQL master-slave backup architecture. Later switched to the background of the full-text search engine, the front-end or PHP.

A major accident happened at this time. The data for the Customer Self-service system cannot be synced to the backend engine. The client system over there is the Java + Oracle architecture, and the customer's next ad does not sync properly to the background engine. The accident directly caused a series of people to clean up, this is something. I was the interface of the engine, I used PHP script to statistics on both sides of the list of unsynchronized, so that the client system to send messages in sync. Finally, the data on both sides is synchronized well. (In fact, it is a very simple thing)

Backstage I can not stand the Midnight chicken called (the operation of all know), I changed to do the automated test. Wrote three years of automated test scripts, organized a series of automated testing framework, tools, methods. Of course, these are also written in PHP. :)

Backstage in 09 ready to start a business, 10 formally resigned from business, to now, our team with PHP made three of mature open source software. We have compared the amount of code that is written in another language that is similar to what we do: that software is our 1/3, and we have more code than we do. The proportion of bugs and feature in their systems is high. I'm not trying to prove which language, I just want to prove that the PHP language can write thin and elegant code, and can be written very refined, expressive and rich.

In the process of doing these software, we also encountered a series of PHP problems:
    • How to solve the problem of full-text search (without relying on third-party search engines)
    • How to troubleshoot Scheduled tasks (do not rely on operating system scheduled tasks)
    • How the user two times to develop an issue that cannot be upgraded
    • Protection of common security issues (XSS, SQL injection, attachment uploading, CSRF, etc.)
    • How to do the chat server with PHP. (Do a lightweight solution)
    • How to solve the PHP environment deployment problem.

We've all done a relatively lightweight solution that minimizes third-party dependencies.


We also use SSH + PHP to do their own server monitoring system, with PHP written a variety of backup, operation, monitoring of the script.


The above work, PHP is very good to complete. And with the PHP7 version, this version is really amazing and looks forward to the faster version behind the bird brother.


Some of these other languages can also be implemented and can be done well. So the mere argument of language is of no use. Each language has an applied scene and value, and it doesn't really make sense to break away from these conversations.


We recommend that you focus on how to make money and that language is just a tool. It is the person, not the language, that decides the program gracefully.



===================2016 January 27 Morning supplement =====================

Comments Some friends say, why is Java always ranked first? I would like to answer: Since Java is always ranked first, why should you always go to the back of the PHP? What kind of psychology is in effect?


When I answered this question, I knew that someone from another language community would jump out and say something elegant. I want to answer is that you claim to be elegant, then elegant. Why do you always raise yourself up by mocking other languages? What kind of psychological role does it play?


True strength does not need to be proved by belittling other people.

The real strength is to let other people to envy, jealousy, hate. (Haha, pull the hatred.) )

Some people eat full of nothing to do with the netizen, to our PHP things. PHP one does not output keyboard warrior (otherwise it will not be pressed in public opinion), the two do not export hunger and poverty, three do not toss you, there is nothing to say. Built-in wheel too much, is considered to take a shortcut!phper the bow code, busy to make money to fight others black them, anyway, they a dozen a $, this is more money AH




The source of the figure was forgotten, from Zhihuer. Where is PHP black not tragic? As a PhD, Escape ~
  • 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.