Functional programming (FP) is a powerful approach to problem solving. Until now, the majority of the PHP community hasn’t realized this, but it’s actually fully available to us in PHP! When the size of PHP applications increases, they become extremely hard to maintain and reason about, especially when sharing and modifying global state. The current misconception is that applications can only be written with an OO design, so why PHP?
Functional programming doesn’t preclude object-oriented principles, in fact they are orthogonal paradigms that complement each other perfectly well. FP can be used within the context of MVC frameworks, like Laravel, which are driven more towards the OO side. Using PHP to drive the business logic within your model can create a best of breed, poly-paradigm application. In addition, FP allows you to create more testable code that is easier to reason about and free of bugs.
It’s time to create awareness about functional programming in PHP. This talk will focus on what FP is, and how PHP developers can leverage it to develop robust and scalable applications.
1. Pure functions and referential transparency
2. Higher-order PHP functions and closures
3. Singularity principles and modularity
4. PHP high-order functions and closures
5. Functional techniques: currying, partial application, and composition
6. Embedding FP into a Laravel MVC model
7. Understanding monadic containers and functional design patterns for error handling
Session Category : Regular Talk Session