The lambda function is an anonymous PHP function that can be stored in a variable and passed as an argument to other functions or methods. A closure is a lambda function that is aware of its surrounding context.

The lambda functions and closures are often used with the array_map(), array_reduce(), and array_filter() functions: