If you would like to take your programming to the next level, then learning object oriented programming in PHP is what you should be doing. This PHP OOP tutorial series will provide you with all the source code, resources and info absolutely free!
You’ve probably heard of object oriented programming (OOP for short) and now you want to dive in, head first, about this complex subject. Many developers make it seem complicated, but with the right guide, the learning process will be a breeze. Whether you’re a seasoned programmer or a newcomer, this PHP OOP tutorial series is for you if you want to learn OOP in PHP.
So, what is object oriented programming?
In general, object oriented programming is centered around objects instead of actions. An object is just a piece of data. That’s it! Nothing more, nothing less. This data can be anything from connecting to a database to containing information about a certain user.
If you’ve created your own scripts, then you’re probably use to writing procedural code. What I mean is that you write code that executes line by line. This is a style of programming. However, OOP is another style of programming. Instead of executing everything line by line, you execute code in the order you want.
By using objects, you can execute things in different order. You send objects “messages” and then the objects react accordingly. This PHP OOP tutorial series is dedicated to helping you get started. You’ll learn the fundamentals, techniques, and the reasoning behind each concept of object oriented programming.
While object oriented programming isn’t required, it’s definitely handy. Especially if you decide to use third party libraries by other developers. It’s common to write libraries in OOP format.
Before you begin this series, it’s expected you know the fundamentals of PHP. You should understand things like variables, conditional statements and functions. You should also have a server set up somewhere. This can be locally or hosted by a company. You must have PHP 5.3+ installed.
You’ll also need a text editor of your choice. For this PHP OOP tutorial series, I’ll be using Komodo edit. It’s free to use. There’s a paid version, but we won’t be doing anything so advance that we need an advance text editor to help us.
If you already have a basic grasp on object oriented programming, then feel free to skip over certain topics you already know.
PHP OOP Tutorial List
Here you’ll find each PHP OOP tutorial in the order you should follow.
- Getting Started
- Classes, Objects & Instances
- Properties & Methods
- Extending Classes
- Constructor Method
- Scope Resolution Operator
- Static Methods & Properties
- Abstract Classes
- Magic Methods
- Chain Methods
- Type Hinting
After you’re all done, then I highly recommend you bookmark the object oriented programming documentation for PHP. They provide great explanations and examples just in case you forget a thing or two. It’s also open to comments. You can learn more by reading what other developers have to say on a certain topic. Check it out by going here.