sebastian/recursion-context
sebastian/recursion-context is a small PHP utility for tracking recursive traversals and avoiding infinite loops when walking nested structures. It provides the RecursionContext class used by sebastian/comparator and PHPUnit to handle recursion safely.
sebastian/recursion-context is a small, dependency-free PHP library that provides a Context class for tracking recursion while walking nested arrays and objects. It is used by tools such as PHPUnit and sebastian/object-enumerator to detect when the same array or object is encountered again, preventing infinite loops during serialization, dumping, or enumeration of recursive data structures.
contains()add() and remove() (push/pop)composer require sebastian/recursion-context)How can I help you explore Laravel packages today?