Lambda

After allot of coding of late, thought that I would place online a great syntax called lambda which allows you to do assign functions to a variable that is callable!!. So the functions like pref_replace_callback that has a function as the parameter to be used if any matches are meet.

What it is doing is assigning to the $call variable is the actual function call! which is able to be able to pass in via the parameters a parameter but also to “use” local variables within the function. The $name is passed in to the newFun function and is then use[d] within the lambda function, how cool is that!.