PHP 5.3 started with adding new features in PHP that change the game forever in the language. These are lambda functions/closures & namespaces. Here in this tutorial, we will explore lambda and closure functions in PHP with some practical examples.
In this tutorial, we’ll take a look into what is lambda function & closure with a coding example to understand easily.
So back in 2008, an RFC (Request for Comments) was proposed by Christian Seiler, Dmitry Stogov in which it is suggested that without support for closures, lambda functions are not useful enough to add them to PHP.
Lambda function plays an important role in the development of the closure function. First, we’ll understand about lambda function, and then we’ll see the relationship of it with closure.
https://programmingdive.com/lambda-and-closure-functions-in-php/
Top comments (0)