Home >Backend Development >PHP Tutorial >How to solve the bottleneck of in-depth learning of PHP
PHP gives learners the feeling that it is easy when they first learn, but after 2-3 years of learning, they deeply feel that they have encountered The bottleneck is difficult to penetrate, and it would be a pity to give up. The feeling of "it's worthless, it's a pity to abandon it" is very appropriate. Backing off; after learning, there seems to be no progress;
if
else, loop You also know these, and you can even remember some things that others cannot understand Function, but when the project comes, I feel confused, even though I have a lot of words to say, I actually have no idea what to do when I encounter any problem... ...At this time, first of all, congratulations on your entry into the industry, and secondly, congratulations on having encountered the bottleneck of learning PHP in depth
But once you pass this level, your level of understanding will be even higher. One floor. But this level is not easy to pass. Because what hinders you is not PHP things, but many non-PHP things...How to solve this bottleneck? Learning PHP?1: In-depth understanding of
programmingis not just familiarity, but proficiency;
PHP starts withvariables
, branch statements, Loop statements, and then functions, so this is the programming idea you will encounter at the beginning: process-oriented programming idea. It is a processing idea that uses functions as units and encapsulates the code that causes duplication into functions. This kind of thinking can also be developed directly when developing projects. However, you will encounter a lot of repeated codes and you will create a lot of files. Therefore, the biggest feature of developing projects using only process-oriented programming ideas is: in the project Too many files... Too many files will make it difficult to control the distribution of folders, which is also not conducive to project maintenance and upgrades. It is difficult to build a large project, which is usually the same as a corporate website#. ##You should reduce the number of files, then you need new ideas: object-oriented programming ideas. Its main features are: encapsulation, abstraction, inheritance, polymorphism,
interface. ##Don’t memorize these things by rote, but fully understand them with practical principles, and at least be able to convince yourself. For example, let me ask you, why are inheritance and why are they based on polymorphism? Why do they look like that? This is the key point, and the difficulty is that you seem to have read it all, and you have read a lot of books, but when you use it, you seem to be confused. It's irrelevant. Because you haven't fully understood it. This will at least hinder your in-depth understanding of PHP's framework
. For example, many people use TP to develop projects and use Laravel to develop projects, but have you studied TP in depth? Source code? Laravel source code? What is Composer? Why is this so? At this time, you should be at the stage of "reading a thin book but a thick one". You should fully search for the answers to these questions, ask more why, and then find the answers. In the process of finding the answers, you Unknowingly, the level has been improved...Form: 5"ord
er="id asc" limit="10">《{$title}》- --{$author}{$add_time
}This is a method often used to obtain dynamic data when setting templates, but you can. Explain why you do this? And why it looks like this?MVC is not about memorizing these words, but a deep understanding of them. Understand why there are Controllers, Model, Views, and what their respective contents should be...
Regular expressions also require proficiency.
It’s time to start learning about database sub-databases, sub-tables, partitions, and database clusters.
Database optimization, such as: Index optimization, SQL statement optimization, etc.
such as: file cache, database cache, memory cache, etc.
These will involve many things, such as: How to write and operate configuration files, database cache tables, cache fields, etc. The introduction of NoSQL, such as: Memcache,Redis,Mongodb,....
is mainlyLinux Server, there is a lot of content on it, and the first ones brought out are web monitoring programs such as Apache and Nginx.
There are also common programs such as ssh, ftp, etc.
Deeper, there is shell programming, and using shell programming to develop a server management system, such as: AMP, WDCP,.... These things may seem irrelevant to you who work in PHP, but if your website Can't access it, do you know what the problem is? So it's not irrelevant, but it's very relevant, so don't keep that narrow sense of limitations anymore.
These are necessary contents for building a project with development potential. How much do you understand? Related to PHP.
I believe you will listen when you learn data structures when you are a freshman. It talks about pointers, linked lists, queues, stacks, etc. It's a bit confusing, and you won't be able to use it very much. But at this stage you can study in depth, which will help you understand the principles of Apache, for example, and of course make it easier for you to use Apache. This actually helps you solve the bottleneck problem invisibly.
Mainly: C language, C++; it can be seen that C language and C++ are very important basic languages. The PHP interpreter is written in C/C++, and the browser is also written by them. This is of course linked to your PHP application.
Such as: WeChat development, the use of various third-party plug-ins, such as: jquery,Layer,bootstrap,Uploadify. You can even write the necessary plug-ins yourself.
Don’t just limit yourself to PHP, but start working on the front-end, because front-end things can give you a deeper understanding of PHP. For example: extracting articles from the homepage of the website, if the numbers are 1, 2, 3, 4, 5, you can solve it from the front end, or you can solve it from PHP... What if you require more perverted information display? It is very likely that it is suitable to solve it on the PHP side or even on the database side...
Expanding your knowledge will help you learn PHP in depth...
In short , when you have a certain foundation in learning PHP, you will no longer easily say that PHP is easy, very simple, and you can learn it in two weeks and so on. You may even feel that you are getting smaller and smaller, and you still need to learn a lot of things. This is okay, at least you have really entered this industry, but you will increasingly encounter the bottleneck of learning PHP in depth. What's holding you back is a lot of non-PHP stuff. You have to use an open-minded mind to explore what you encounter. Don't be picky or picky, despise this or that, but complain all day long...
Just stick to it and solve each new problem. Why, your bottleneck will pass one day, and then you will truly have learned something, and become a master who is well-rounded and has the ability to comprehensively solve problems.
The above is the detailed content of How to solve the bottleneck of in-depth learning of PHP. For more information, please follow other related articles on the PHP Chinese website!