Now that we've seen how functional programming can be used to solve common programming issues, it is time we apply these techniques when developing with a framework. This chapter will present various ways to do so with a few of the most common PHP frameworks.
Before we start, a little disclaimer. I am by no means an expert in each of the frameworks we will discuss here. I have worked with all of them at different levels, but this doesn't mean I know everything there is to know about them. So, it is possible I will not be presenting the latest best practices here, despite the research conducted while writing this chapter.
This being said, we won't write a lot of code in this chapter. We will mainly look at how you can interface existing functional code with the framework structure and how you can leverage the various framework features to help you write in a functional way. We will also discuss the pros and cons of each framework regarding functional programming.