You might be learning PHP the wrong way
Today I would like to stress out how wrong you might have been learning PHP. As this may sound strange to many of you, I've noticed most people in the community learn from the little their friends know, from snippets online, or from snippets grabbed from tutorials here and there. Many learn on the lot. If you seem not to agree with me or still don't understand why, try answering the following questions:
- Do you learn from tutorial websites like SitePoint, tutorialpoint, tuts+, etc?
- Do you believe the PHP manual doesn't have more details on things or you don't usually learn on it?
If you answers are "yes" then consider that I am right. Tutorials on many websites like Lancecourse, SitePoint, etc. are usually meant for a specific audience with a specific need. Hardly you see full tutorials explaining how/what PHP is in detail. This makes learners learn from all corners of the web and at the end, it becomes very hard for them to measure how much they know and what they can do with the little they know.
Let's consider this analogy. When you buy a TV, the first thing you do is to read through the manual. The more you understand it the better you enjoy your TV's functionalities. It's the same thing with PHP and many other technologies out there.
If people are still learning and using outdated PHP codes it's exactly because they are not aware of what is actually being used, what has PHP deprecated or removed. Elites outside know about this, but most of the time they don't see it useful to share it with you. But it's key for you as a beginner. It's even very important for you to know how exactly PHP is made, how it moves, and where it tends to head over. That's what will encourage you the most to learn it.
Check out this:
8 Tips To Become A Great PHP Programmer In A Week
Start Learning Programming In Good Hands
Tutorial websites do quite well their job. But you need to understand that it's not usually to guide you from the ground up. We usually tackle some topics of the language, its community, or programming methods. Also, PHP has expressions and words you need to know in order to know the jargon. That helps you to communicate accurately with other developers. I think it's very important you start from the official PHP manual before anything. If you wonder why read this
If you are starting with PHP or you are worried about the cleanness of your learning process here is how I think you should proceed:
If you are a fresh learner. If you have not been able to create anything yet with PHP or you are planning to start learning PHP start with this:
1. PHP FAQ: Frequently Asked Questions precisely here
2. Read the Apendix especially the history of PHP
3. Get Started.
Go through the introduction to learn what PHP is and what you can do with it.
4. Installation and Configuration
Once you are convinced you want to start, install PHP on your machine. Choose the right copy based on your OS.
5. Go back to the get started and go through a simple tutorial
With this, you would have known what PHP is, why you want to learn it, where to learn it and how to create a simple working code in PHP. Now, you are open to the PHP world. The documentation is mainly divided into four important sections: function reference, the language reference, the features reference and the supplemental information or Appendices
Your next step is to learn more about PHP syntax, data types, variables, constants, expressions, operators, Control Structures, Functions, Classes and Objects, Namespaces, Errors, etc. and that is done in the language reference
6. Head over to the language reference
This step may take a lot of time. One thing you should keep in mind is you need to practice very well. Don't jump things. Read the contribution notes under each functionality, see what other users are saying about it.
During your journey in this step you might need the Index listing
7. Learn about the language features
8. Now move to the Function Reference
At this stage, you must have spent some months if not years depending on how dedicated you are. But you would have also created some amazing things(websites, components, etc). Don't be surprised when I say you must have spent some time on this because that is the truth. I am not sure it will come a time that you won't be referring yourself to this manual. Even the core contributors are still reading it.
That said, by now you should have also started understanding those specific tutorials better. You can start coding wisely. You must be looking for where to meet some cool developers or where to learn the best coding practices. Continue with the following steps:
9. Start another learning cycle with PHP TheRightWay by Josh Lockhart creator of the Slim framework and Phil Sturgeon
10. Follow the laws of the community
Bottom line
Out of this, the manual shouldn't be a giant cloud on your head anymore. From here you are a free bird. You know where to go if you want to know. I hope this helps you keep your learning fresh and up to date.
If you like this, please help me by sharing it with your friends. Thanks for reading.