OOP: Composition & Inheritance in PHP

Inheritance is one of the primary tenets of object-oriented programming languages, but each language implements it at least slightly differently. I’m coming from a background in Python, and it took me a bit to understand the different ways objects can extend or inherit behavior in PHP. Here is what I have learned!





Senior Software Engineer | www.adriennedomingus.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Adding Functionality to Google Pub/Sub: Queue Meta Processing

[LeetCode]#88. Merge Sorted Array

CRODO.IO New Launchpad

How to read files from SharePoint and store them in Azure Blob Storage

How to build and distribute iOS apps without Mac with Flutter & Codemagic

Build a DIY IoT home office ‘Busy Light’ with Circuitpython and MatrixPortal

Top 3 Programming Languages For Implementing a Computer Vision System

CoC Episode 1: Let’s Git with Arsalan Dilawar

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adrienne Domingus

Adrienne Domingus

Senior Software Engineer | www.adriennedomingus.com

More from Medium

What Are SOLID Principles?

SOLID principles in a nutshell

Using Enum in Symfony

How to Build and Distribute Beautiful Command-Line Applications with PHP and Composer

CLI tool preview