So you know a bit of HTML & CSS and now want to learn PHP, but are confused about selecting the perfect resource or the roadmap, or you don’t know where to begin from or just want the answer to why learn PHP? This guide or the roadmap as I like to call it, will solve this for you. The following roadmap if followed along with discipline will definitely make you a good, kind and humble developer using the greatest programming language ever created for web development. So, just lets dig into the meat of the matter.
A question might have popped into your head after reading the previous line. Is PHP really the greatest programming language ever created for web development? The short answer to this is ‘Yes it is’. PHP powers more than 30% of the web (actually quite more than that, but since you are a future PHP dev lets just start practicing being modest & kind too). Its easy to learn and get going with PHP. Right from its initial release PHP has been in its own zone of server side scripting till date. It never tried to do everything from front-end to back-end, web to mobile, which makes it easier to learn. (See the language is so humble itself so we need to be the same right?)
What will you learn from this?
This roadmap lists the complete course from step 1 to the end that will help a beginner learn PHP in the correct order right from scratch understanding almost all aspects of the language. If you are ever stuck somewhere while learning hit me up on twitter at @introwit and I will be glad to help you.
A few precautions to take
If you already started tinkering with PHP by being introduced to it via WordPress or a PHP framework, you should halt and take this course, get better at vanilla PHP and then resume back.
- Step 1: Sublime Text
Before starting to learn any programming language a good code editor is needed which becomes our playground to learn & write the code. Sublime Text is the perfect fit for this. After downloading sublime text, this series by Jeffrey Way should get your Sublime Text completely setup & running for PHP development.
- Step 2: PHP Pandas
Now we are ready to start learning the language. PHP Pandas by Dayle Rees is the most beginner friendly book to start learning PHP, it’s worth every penny, trust me you won’t regret.
- Step 3: PHP Enthusiasts
Next step should be learning Object oriented programming with PHP. This is the most important aspect of PHP to learn. Knowing OOP with PHP makes you stand out as a better PHP dev in competition with others. But don’t learn it for the sake of that, learn OOP approach because it makes you a better programmer and makes learning other languages in the future much easy for you. For this job, PHP Enthusiasts is the goto resource out there. Joseph Benharosh has done a tremendous job with all the quizes on the website, every article and the book itself.
- Step 4: PHP Practitioner
My personal favourite teacher Jeffrey Way has this amazing series on Laracasts.com titled ‘PHP Practitioner’. This is the perfect blend of the above 2 steps being the much needed refresher and is completely free as well.
- Step 5: Jump start PHP environment
After completing the above 4 steps, its the right time to learn about the perfect environment setup for PHP. Bruno Skvorc’s Jump Start PHP Environment is the best in the business to learn this.
- Step 6: Smile
Smile because you have come a long way. If you have completed all the above 5 steps you deserve appreciation & my respect. It looks easy but ain’t & who knows that better than you and me, hi-5 dude!
- Step 7: Roll your own mini framework
A good PHP framework helps you to not reinvent the wheel and focus on the main business logic of your each project. By learning to build your own mini framework you will understand how the different components of an actual framework are tied together and things will feel less “magical”. Also you will understand how to structure and organise your code in more efficient and modular manner specially for a large code-base. Before diving into any actual framework let Alex Garrett teach you how to create your own PHP framework. At the end you will feel no less than a Superhero with massive powers!
- Step 8: Composer & Autoloading
Since you might have already learned about Composer & Autoloading in bits in the above steps, let’s understand step by step how does composer & autoloading actually work. Luckily, Alan Storm has written an entire series on this for you.
- Step 9: Laravel Fundamentals
It’s the time to travel to the world of Laravel. Laravel fundamentals by Jeffrey Way is the series you should start your Laravel journey with. Its for the 5.0 version of Laravel but still the best series on the internet to start out with.
- Step 10: Git
You might have got a fairly good introduction to Git in Step 5, but now lets focus solely on it. Git is the thing I vote for to be a standard in web development right after HTML & CSS. Jeffrey Way has done great work on explaining Git to beginners with his Git me some version control series on laracasts.
- Step 11: Learning Laravel’s latest version
Since after learning Laravel fundamentals you might want to start with its latest version available. Jeffrey Way does this Laravel from Scratch series which is updated for every new Laravel version that is released.
Never Give Up
There will be times you will hear “Where are the PHP Unit tests for your code?” , “Why are using this X pattern in your code?”. Billion people, billion opinions. Just answer them, don’t feel bullied. Practise will make you perfect. Decide wisely what you want to learn next. I still haven’t started with testing because I feel its still not the right time for me compared to improving my object oriented programming skills which I practice & improve daily. If you are any young & still studying in high school like me you are already ahead of the experienced & pro devs out here ;) Comment below or hit me on twitter if you are stuck somewhere. Also do post the links of something you have build after learning PHP, size of the project doesn’t matter, your determination does :) Question everything you learn! Will leave you with a quote by Conor McGregor:
“There’s no talent here, this is hard work. This is an obsession. Talent does not exist, we are all equal as human beings. You could be anyone if you put in the time. You will reach the top, and that is that. I am not talented, I am obsessed.” — Conor McGregor