Home  >  Article  >  Backend Development  >  Why, after studying PHP for two years, I suddenly thought about it and thought that I only know additions, deletions, and corrections. What else is there in PHP?

Why, after studying PHP for two years, I suddenly thought about it and thought that I only know additions, deletions, and corrections. What else is there in PHP?

WBOY
WBOYOriginal
2016-07-20 12:01:311180browse

Reply content:

Addition, deletion, modification, and query are determined by the business model and have nothing to do with PHP, but what if the problem you face changes?

The settlement system is so complex that it would take a month to run the order form one by one. What should I do? I want to do it in batches, but I find that the boss can’t pay the money and there is not enough memory to run it. What should I do? Let’s split it up again. , As a result, rich people need to write 2,000 lines of code to solve problems that Hive can solve in one sentence.

For the sake of performance, everyone decided to use Phalcon. When building the scaffolding, I found a lot of pitfalls. What should I do? Read zephir and modify the framework to meet the needs.

The product manager is slapping his head every day. The requirements raised today will change tomorrow, and the written code needs to be modified. What should I do? Learn OOP and design patterns, write the code impeccably, and have good scalability. Directly Slap the product dog in the face.

The boss needs to write a push in a few days and uses PHP. Here he needs to solve problems such as asynchronous, process scheduling, socket programming, etc. It is not very good to solve it with PHP. Fortunately, swoole is available, but swoole takes some time to perform. There are still problems, and in the end we have to use C/C++ to solve them.

Slowly, all the problems that can be solved or are suitable to be solved with PHP are solved. However, there are still a lot of problems. What should I do? Find new technologies and new methods to solve the problems. In fact, what is said above is also true. PHP has never been a technology that can solve it. Mysql's read-write separation, database and table sub-database, engine tuning, distributed Spark, Storm, Hive, Kafka, etc. all need to be introduced at the right time to solve the problem.

But what if the product manager asks for additions, deletions, modifications and checks every day but does not give time to refactor to solve performance problems? Resign, otherwise who will support you if your level is still so low in a few years, product manager? Why, after studying PHP for two years, I suddenly thought about it and thought that I only know additions, deletions, and corrections. What else is there in PHP?Although most of the contents of this picture still involve additions, deletions, checks and modifications Thank you for the invitation. It’s nothing. Just add, delete, modify and check. . . Of course, if you have time and are interested, you can look at OOP, you can look at servers, you can look at system architecture and so on. Let me tell you a secret, workerman Don't underestimate additions, deletions, modifications, and searches. Don't think that it's over once the function is implemented. You still have to think about how to optimize it and how to add, delete, modify, and search at the minimum cost. In addition, PHP involves many fields, including servers, databases, front-ends, and network protocols. You must be involved in all aspects, not limited to the language itself. PHP is just a language.
But PHP is also like a car, it can take you around.
I’m too lazy to say too much, I just want to think about my own vision. Please refer to php.net PHP is just a language, but the related knowledge is infinite, it depends on how you learn it It’s definitely not as simple as adding, deleting, modifying and checking.

There are too many additions, deletions, modifications and checks. Have you considered how to make it easier? So, you can write a class library. The class library can solve sql operations. If you are tired of using the class library, you can write an ORM yourself.

ORM is equipped with operators and template interpreters, and your framework is ready.
PHP can not only operate databases, but also has many useful uses. Yes, it’s just adding, deleting, modifying and checking. In situations such as large amounts of data and high concurrency, additions, deletions, modifications, and queries can be better realized.
Statement:
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