Functional Php: page 1
A little known feature of PHP’s static keyword is that it allows for memoization or function caching. This is a process whereby a functions heavy lifting can be cached so that subsequent calls are faster. It is possible to store any value in a memoized way such as arrays or even objects. This is done without any external side effects - that is to say that the code calling the function will require no changes to support memoization. Read more ⇒
It is possible to treat a class instance as a function in PHP. Quite often this is referred to as a functor even though it should really be known as a function object. This is because functions actually serve a different role in languages that support their use. The convenience of having a reusable function that can be overloaded and carry a context is something to weigh up against using functions or closures. Read more ⇒
Functional Programming in PHP - The book
After working hard on the guide to Functional Programming in PHP I am pleased to announce that it has been published by php[architect]! The book is offcially now available and you can purchase your very own copy! If you’re a programmer who wants less bugs and easier testing then this is the functional introduction for you. Throughout the chapters I gently lead you through the various functional constructs available in and with PHP. Read more ⇒
Functional Programming on Three Devs and a Maybe
I was recently invited to join Edd and Michael to appear on the Three Devs and a Maybe podcast to discuss function programming. The recording of our chat is now available so head on over and have a listen. If you haven’t listened to the podcast before there are some 34 past episodes archived there as well! note If you are interested in finding out more about my book on functional programming in PHP or to subscribe for notification of its release please visit functionalphp. Read more ⇒