Back Button PHP

Object-Oriented Principles in PHP

The typical beginner, whether they realize it or not, first learns procedural programming. But, before too long, they level up. Suddenly, an entirely different paradigm is introduced: object-oriented programming. Little do they know that they'll spend years researching and learning exactly what it means to work with objects and messages.

In this series, you'll be introduced to the core principles of object-oriented programming in PHP. We'll begin with the basic constructs and work our way up.

Intermediate
Difficulty
4 episodes
32:53 mins
Start Series
  • Latest Episode: Abstract Classes

  • Like this series? Share the love!

  1. Section 1 Constructs

    1. Run Time 4:42

      Let's begin with an introduction to classes in PHP. I like to think of a class as a blueprint or template that defines the overall structure and behavior for some concept in your codebase.

    2. Run Time 9:24

      If a class is the blueprint, then an object is an instance (or implementation) of that blueprint. In this lesson, you'll learn how to create multiple instances of a class, how to define and set internal state, and how to declare static constructors that better reflect how you might speak in real life.

    3. Run Time 10:47 Free

      Inheritance allows one class to inherit the traits and behavior of another class. This should instantly make sense, in the same way that a child inherits characteristics from their parents. In this lesson, we'll review several examples of inheritance in action.

    4. Run Time 8:00 Free

      An abstract class provides a template - or base - for any subclasses. In this lesson, we'll work through an example that demonstrates how, why, and when you might reach for an abstract class.

Series still in development robot

*Series still in development. Check back often for updates.