I came across an interesting post on the Internet, describing the use of SPL The text is small, but I really liked the implementation. Further translation (if you can call it that) + some ad-libbing When a multilevel array appears in our program, in order to process it efficiently, you need to write a bunch of recursive functions or write a huge number of foreach, while or for cycles (like someone used to)