Many programming languages have embraced Functional Programming paradigms to augment the tools available. It also facilitates writing code that is easier to understand, easier to test, and able to take advantage of parallelization. PHP introduced anonymous function and closures in 5.3, providing a more succinct way to tackle common problems. However, making the leap from the more common imperative style requires understanding how and when to best use lambdas, closures, recursion, and more. Functional Programming will show you how to leverage these new language features by understanding functional programming principles. Plenty of examples are provided to illustrate each concept as it's introduced and to show how to implement it with PHP. You'll learn how to use map/reduce, currying, composition, and more. You'll see what external libraries are available and new language features are proposed to extend PHP's functional programming capabilities.
The book tries to talk about many things, but the level of detail it goes into each is comparable to a brief blog post on the subject. The code examples are full of awkwardly named variables and functions and would have been hard to follow even without all the functional stuff in the code. And speaking of that, the books spends about a third of its pages on practical stuff (map, filter, reduce, lambda functions, closures) and then goes into Haskell mumbo-jumbo: it introduces functors and applicatives for no apparent reason and than "hey, that's some cool stuff". After that, it turns into a yet another monad tutorial. After you have encountered various mathematical abstractions that really only make sense in the context of a powerful type system, you're left with a brief introduction in the world of events (as in libevent), asyncs and promises. Why? I'm not entirely sure, but I assume that the presence of anonymous functions in those three concepts qualifies them as functional.
Two bonus features that justify a 1 of 5 star review:
* It uses the term "head recursion" to mean "non-tail recursion". As if that's a real thing.
* The author has reviewed his book on Goodreads as 5/5, which would have been somewhat fine, but his only other review is of "The C Programming Language" by Kernighan & Ritchie and he gave it 4/5. Not very objective.