- No products in the cart.
— EBook in PDF Format — Will be Available Instantly after Successful Payment.
Write Concise, Maintainable, and Easier-to-test Code
Many languages have embraced Functional Programming paradigms to augment the tools available for programmers to solve problems. It facilitates writing code which is easier to understand, easier to test, and able to take advantage of parallelization. Functional Programming is a good fit for building modern, scalable solutions. Can you use functional programming in PHP?
PHP introduced anonymous function and closures in 5.3, providing a more succinct way to tackle common problems. More recent releases have added generators and variadics which can help write more concise, functional code. However, making the mental leap from programming in the more common imperative style requires understanding how and when to best use lambdas, closures, recursion, and more. It also requires learning to think of data in terms of collections for mapping, reducing, flattening, and filtering.
Functional Programming in PHP will show you how to leverage these new language features by understanding functional programming principles. With over twice as much content as its predecessor, this second edition expands upon its predecessor with updated code examples and coverage of advances in PHP 7 and Hack. Each chapter provides plenty of examples 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. Finally, the book reviews the available external libraries and looks at new language features proposed for extending PHP’s functional programming capabilities.