Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

LinkedIn Learning

Functional Programming with PHP

via LinkedIn Learning

Overview

Learn functional programming with PHP. Discover how to take up this popular programming paradigm to write more readable, maintainable code.

Syllabus

Introduction
  • A functional approach to transform code
  • What you should know
  • Installing and running PHP
1. Introductory Functional Concepts
  • Why use functional programming?
  • What is declarative programming?
  • Immutability in functional programming
  • Separation of data and functions
  • First-class functions
2. First-Class Functions
  • Functions as data, part 1
  • Functions as data, part 2
  • Passing functions as arguments
  • Returning functions
  • Closure
  • Higher-order functions
  • Arrow functions in PHP
3. PHP: The Functional Parts
  • Working with arrays, functionally
  • The spread operator and array_merge
  • Mapping
  • Filtering
  • Passing keys to array functions
  • Sorting
  • Custom sorting behavior with usort
  • Reducing
  • Combining array functions
  • Challenge: Recreating the array_map function
  • Solution: Recreating the array_map function
4. Advanced Functional Concepts
  • Advanced functional concepts
  • Partial application and currying
  • Recursion
  • Composition, part 1
  • Composition, part 2
5. Code Conversion Challenges
  • Challenge: Property getter
  • Solution: Property getter
  • Challenge: Tallying votes
  • Solution: Tallying votes
  • Challenge: Value or array
  • Solution: Value or array
Conclusion
  • Next steps

Taught by

Shaun Wassell

Reviews

4.8 rating at LinkedIn Learning based on 33 ratings

Start your review of Functional Programming with PHP

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.