Immutable lists

Learn about the immutable-lists data structure in PHP.

What are immutable lists?

An immutable list is a persistent data structure. That is, it’s a data structure that maintains its previous version whenever it’s modified. An immutable list always yields an updated version of itself. It’s possible to view an immutable list as an upgrade of constants, which don’t have the properties of persistent structures.

PHP libraries supporting immutable lists

There exists multiple libraries in PHP capable of enabling the creation of immutable lists. Among the packages with ...