In this chapter, we'll talk about Reactive extensions in PHP, a PHP library that allows PHP programmers to work with PHP in a reactive manner, and how to use in event, also known as publish-subscribe programming. We'll also discuss the idea of functional programming in PHP and how to program in a more succinct way. We will also discuss the following topics:
Map
Reduce
Defer
Reactive extensions in the following use cases:
Data analysis of logs (parsing Apache logs)
Queueing systems (asynchronously working through a queue of tasks)
Events
Reactive extensions are a way to code in a functional way using PHP. They are a set of libraries (available on GitHub at https://github.com/ReactiveX/RxPHP) that can help you compose event-based programs by using observable collections and LINQ-style query operators in PHP.