Browse all series
LanguagesBeginner10 episodes

Object-Oriented Principles in PHP

Beginning developers are usually first introduced to 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 course, you'll be introduced to the core principles of object-oriented programming through the lens of PHP. We'll begin with the basic constructs and work our way up. The only prerequisite is an elementary understanding of the PHP language and syntax.

Series episodes

Classes

9m 12s

Discover PHP classes as blueprints for your code. Learn how to define structure and behavior to build clean, organized applications in this friendly Laracasts lesson!

Objects

10m

Learn how to create and use objects in PHP by working with class instances, constructors, and internal state. Build solid OOP foundations in this Laracasts lesson!

DTOs, Types, and Static Analysis

12m 22s

Learn how to create DTOs in PHP and use static analysis with types to ensure data validity. Boost your code quality in this clear, hands-on Laracasts lesson!

Dependencies, Coupling, and Interfaces

20m 6s

Understand dependencies, coupling, and interfaces to write flexible, maintainable code. Join this Laracasts lesson to improve your object-oriented skills!

Inheritance and Abstract Classes

19m 45s

Learn inheritance and abstract classes in PHP with clear, practical examples. Understand how class hierarchies work to write cleaner, reusable code.

Interfaces as Feature Filters

12m 43s

Explore how interfaces in PHP can act as feature filters, not just contracts. Learn to control functionality and enhance your code’s flexibility and design.

Encapsulation and Visibility

20m 55s

Understand encapsulation and visibility in programming. Learn how hiding internal object states improves class APIs and keeps implementation details private.

From Getters and Setters to Property Hooks

15m 23s

Discover how PHP 8.4 property hooks transform class design. Learn the role of getters and setters and modernize your code with new language features!

Understanding Object Composition and Abstractions

19m 16s

Explore object composition and abstractions to build complex systems from simple parts. Learn how classes can connect for powerful, flexible code design!

Object-Oriented Workshop

30m 46s

Build a flexible FileStorage interface in this hands-on workshop. Learn to swap implementations based on environment and master object-oriented design!

Continue learning

Thumbnail for CSS Flexbox Simplified
CSS Flexbox Simplified

With Shruti Balasa

  • 12 episodes
  • Beginner
  • Languages
Thumbnail for Wordle Workshop
Wordle Workshop

With Jeffrey Way

  • 17 episodes
  • Intermediate
  • Languages
Thumbnail for ES2015 Crash Course
ES2015 Crash Course

With Jeffrey Way

  • 17 episodes
  • Intermediate
  • Languages
Thumbnail for PHP For Beginners
PHP For Beginners

With Jeffrey Way

  • 50 episodes
  • Beginner
  • Languages
Thumbnail for PHP 8 Crash Course
PHP 8 Crash Course

With Jeffrey Way

  • 9 episodes
  • Intermediate
  • Languages

Would you like to hear from Laracasts by email occasionally?