Learning PHP, Deeply: 8 Resources for WordPress Developers
Learning PHP, Deeply: 8 Resources for WordPress Developers
Set out in 19 logical and easy to digest chapters, PHP: The Right Way is an excellent resource for general best practices.
It’s a hefty one-pager organised with anchor tags, but don’t be intimidated – it provides an easy-to-follow overview of the language, with detailed sections on basic topics, such as how to get started and coding practices through to more advanced subjects, such as testing, servers and deployment. There are plenty of code examples that are easy to follow along, as well as external links and suggestions for further reading – a nice touch when you want to really get stuck into understanding a topic.
PHP: The Right Way is an open source project maintained by a group of volunteers and it’s kept up-to-date – the information on the site is current for PHP7, so you won’t find any old code here.
It’s also worth noting that this resource has been translated into 21 languages so if your native tongue isn’t English, you’ll probably find a translation that suits you.
If you’re a hands-on learner and love to roll up your sleeves and get stuck in, online code school Codecademy offers a free four-hour course for beginners. It’s divided up into 11 units that cover concepts including conditionals and control flow, loops, functions, and object-oriented programming.
What’s great about Codecademy is that it’s interactive. Each lesson is displayed in a pseudo console in your browser and you enter code to complete a set of instructions before moving on to the next lesson. It’s almost like a game and highly motivating if you’re into gamification.
After reading up on PHP theory, completing this course is a fantastic way to cement what you’ve learned in a very practical way without actually setting up a server.
This is the official manual for the PHP language and yeah, you could say it’s fairly comprehensive. It covers everything from basic commands and syntax to security and functions.
Navigating this site can get you in a head spin as you click on link after link, going back and forth trying to read the content in a logical flow. There are no forward or backwards links or even some helpful sidebar navigation to make things easier for you, making for a confusing and somewhat laborious user experience. I’ll also mention here that it’s not the most attractive site going around.
User-unfriendliness aside, this manual is the PHP bible and hard to beat if you want to really learn PHP inside out.
If you already know the basics of PHP, Tizag is a great reference that’s easy to navigate despite the old-school layout and design.
The code examples are easy to follow though the accompanying explanations are pretty thin. This is a comprehensive guide so much as an overview of the language, so you’ll want to read over this tutorial in addition to other reading.
Still, Tizag is a good one to bookmark and come back to later when you’re starting to get the hang of PHP and want to read more to help what you’ve learned sink in.
PHP 101 is perfect for absolute beginners. It’s set out in 15 easy to follow chapters that ease you into the language with simple code and detailed explanations.
1.6 million WordPress Superheroes read and trust our blog. Join them and get daily posts delivered to your inbox - free!
What I love about this tutorial is that it’s packed with fun analogies that break away from the boring code speak you see in other tutorials. For instance, in the section on object-oriented programming:
“To understand this better, pick an animal, any animal. I pick the bear, because I like bears. Now ask yourself, can you consider this bear, within the framework of OOP, as an “object”?”
Framing examples in this way not only makes for fun reading but keeps you awake when the concepts become increasingly difficult as you read through the content.
It’s important to note that this tutorial focuses on PHP 4 and PHP 5, so you’ll need to read up on PHP 7 to be up-to-date with the latest changes.
Hacking With PHP will pull you into a rabbit hole of PHP learning. It’s set out in logical 26 chapters, but don’t let the simplicity of the homepage fool you – this is a comprehensive guide that pulls apart the language and regurgitates it into digestible chunks. I like how it’s set out in short sections with a “Next chapter” link at the bottom, making it easy to read through like you’re turning pages in a book. It’s also possible to jump to any section in the guide from any page thanks to a handy drop-down box.
Each chapter ends with a quiz to help you think over what you’ve learnt, and there are also links to external resources for further reading.
What I like about this guide is how well it’s set out design and layout-wise, making it easy to move from section to section and chapter to chapter.
This fantastic tutorial guides you through using PHP to build an eCommerce store. No mean feat for a beginner, but this Treehouse course break it does into simple and practical examples complete with quizzes.
I love trainer Randy Hoyt’s videos – they’re a little cheesy but it’s hard not to get caught up in his enthusiasm. Visual learners, in particular, will find the videos easier to follow than the dense text and lack of images you find in many PHP tutorials.
It’s worth noting that this course will finish up in March, but there’s another great course at Treehouse that teaches you how to build a basic website with PHP.
Treehouse courses aren’t free so you’ll need to sign up for a seven-day trial or pay $25 a month to do this course.
W3Schools has been around forever and no wonder – it’s a well-designed and easy to follow resource for beginners. But what I love most about this site is that it’s chock-full of examples that you can edit live and refresh to see the resulting changes. When your eyes are starting to glaze other, there’s nothing better than tinkering with a live example to help cement the concepts you’re learning.
This PHP course is super comprehensive. It starts with the basics, introducing you to syntax, variables, loops and functions, and progresses through to advanced concepts such as forms, working with MySQL and AJAX. It’s also really easy to navigate using the sidebar or “Next Chapter” buttons.
For beginners, this is a great place to start, but it’s important to keep in mind that this tutorial cover PHP5 so you’ll need to do further study elsewhere in order to be up-to-date with PHP7.
Learning a new language really comes down to just diving in and soaking up as much as you can (and trying not to sink!). There’s no right or wrong way to learn PHP. Reading lots of different resources and even re-reading resources will help cement your learning, as well completing practical courses.
For beginners, there are plenty of excellent resources in this list to help you get started. I would recommend completing the course at Codecademy and then reading over PHP: The Right Way to get a solid feel for the concepts of the language. Once you’ve got a handle on things, check out the PHP Manual and start taking in some more advanced topics.
As with learning any new skill, it’s important to practice, practice, practice. This list is just the start of your PHP journey (as cliche as that reads). Happy coding!
Have you used any of the sites mentioned above to learn PHP? Do you have any other favorite resources for learning the languages? What are your tips for understanding PHP? Let us know in the comments below.