In this tutorial you’ll explore anonymous functions in PHP. Anonymous functions are a PHP feature that you probably won’t use that often; however, they can be really useful in certain situations, as you’ll see.
You’ll look at the following concepts in this tutorial:
- What anonymous functions are, and how you create them
- How to assign anonymous functions to variables
- How to call anonymous functions
- Using anonymous functions to create neater callbacks, and
- Creating closures with anonymous functions.
Ready to dive into anonymous functions in PHP? Let’s go!
[Read more…] about PHP Anonymous Functions: What Are They, and Why Use Them?