Home >Backend Development >PHP Tutorial >The correct posture to become a PHP programmer_PHP tutorial
I am a bigot. I have been self-taught PHP for almost two years, and I feel like I am still an entry-level player. Tell me how you got there step by step.
1. Official documents
Yes, I still stick to that point of view: 80% of code problems can be solved by reading the documentation carefully.
So if you want to learn PHP, you absolutely cannot avoid PHP’s official documentation. You may have followed a teacher's online teaching videos to learn programming when you first started. This is an excellent way to learn programming. But no matter how you watch the video, you still have to go back to the official website documentation in the end. You don’t need to download every function, but it is recommended to save some commonly used functions and core concepts to the memory area of the brain to ensure that they can be adjusted at any time when needed. Use it out; you can just remember some functions that are not commonly used, and just check back when you are not sure. But no matter what kind of content it is, you have to read the content carefully, including the sample code.
2. PHP THE RIGHT WAY
I don’t know how other people learning PHP got there. I don’t know if they discovered that there are such great PHP learning materials. But I believe that if a person carefully reads the content of PHP THE RIGHT WAY and masters most of the knowledge, this PHP engineer has a very promising future. Because for a PHP engineer who has just started working, this may be the difference between 8K a month and 5K a month.
3. Write more websites
In the final analysis, programming is actually a craft. For programmers with similar IQs, the level of skill often depends on how much they practice. Since PHP is designed to create web applications, there is no doubt that you should write more code and turn your interesting ideas into websites you build with code. Nothing else, just to practice more. This process can expose you to more code problems. Once you solve these problems, your experience value will increase again.
I have written about several sites for a long time, and the following are the ones that impressed me most:
In fact, in the process of writing these things, the more problems you solve, the more your abilities improve.
4. Getting Started Framework
Writing code is indeed a craft, but after we have mastered enough basic knowledge, our consideration should be from how to create an application to how to write a better application faster. At this time, the role of the framework is reflected. It can not only improve your development efficiency, but also frameworks like Laravel can make writing code as natural and comfortable as speaking. Understand how the MVC of the framework is implemented, take a good look at the documentation of the framework, and think about what is the best model if I want to extend this framework? Basically follow the idea of: learning framework--"Using framework--"Extending framework--"Contributing framework source code to learn a framework, and you can master almost all the knowledge of the framework. At this time, your programming ideas and level will be greatly improved. improvement.
Recommended framework: Laravel Slim Symfony Yii
5. Read the source code
If writing more code is constructive learning, then reading the source code mentioned here is dismantling learning. While creating, you might as well take a look at how those beautiful wheels are created, and see what other people's ideas are for solving the same problem. While you find that the master's ideas are so wonderful, you are also subtly absorbing them. Follow the master's thoughts.