Back to Writing
Speaking 2026-05-20

Beyond OOP: Functional Programming Patterns in Modern PHP

Think functional programming is just for Haskell nerds? Think again. A 50-minute tour of FP patterns that make PHP code easier to test and harder to break — no math degree required.


A 50-minute conference talk on stealing the best ideas from functional programming and translating them into practical, modern PHP.

Joe Armstrong, co-creator of Erlang, had this famous line: “You wanted a banana, but what you got was a gorilla holding the banana and the entire jungle.” That’s what happens when objects carry too much baggage — implicit dependencies, mutable internal state, side effects hiding behind innocent-looking method calls.

PHP is multi-paradigm. It always was. The trick isn’t picking one religion — it’s knowing when to reach for which tool. This talk covers the FP toolkit PHP 7.4 through 8.5 has quietly given us (first-class callables, arrow functions, match, readonly classes, enums), why pure functions and immutability make tests easier and bugs rarer, and how to compose map/filter/reduce pipelines without looking pretentious.

No Haskell. No category theory. Maybe one tiny monad.


Slides

Your browser doesn't display PDFs inline. Download the slides (PDF).

Download slides (PDF, 1.9 MB) ↓


Talk details

  • Duration: 50 minutes
  • Audience: Intermediate-to-advanced PHP developers — comfortable with OOP, curious about FP
  • PHP version: 8.5
  • Topics covered: First-class callables · Arrow functions · match expressions · Readonly properties & classes · Enums · Pure functions · Immutability · map/filter/reduce pipelines · Function composition · The one tiny monad