Life would be a lot simpler if we had immutable data structures. Code would be easier to understand, easy to test and free of side-effects. Being immutable is not all, these data structures must be efficient. By making them persistent, collections reuse internal structure to minimize the number of operations needed to represent altered versions of an instance of a collection.
Installation
To install this library, run the command below and you will get the latest version
First of all, thanks for publishing this project as open source and thanks for raising the awareness of these concepts in the PHP community.
My concern is that the README right now is aimed only at experts. If you already know these concepts, the README file is perfect because of the short usage snippets and the efficiency information. But if you are new to these concepts, you are totally lost.
Maybe this is intended and you want to keep away novices from your project (that's totally fine because not all projects are aimed for any kind of developer). But if you want to spread the usage of these concepts, it would be great if you could explain better the purpose of this project:
What is exactly the problem that this project can help you solve?
You say that this project helps you avoid "side-effects". Could you create a small PHP snippet showing these side-effects and then the solution that provides this project?
The same goes for "easier to test" claim. Could you please publish a simple comparison between a hard to test PHP code and the easier alternative provided by this project?
Thanks again for creating this project and for publishing it as open source.