azjezz/psl
PSL (PHP Standard Library) offers a consistent, well-typed set of safer, async-ready APIs to replace PHP primitives. Covers async, collections, networking, I/O, cryptography, terminal UI, and type-safe data validation with predictable errors.
The Range component provides a way to create a range of integer values.
Ranges represent sets of integer values with optional lower and upper bounds. They support containment checks, iteration, and bound manipulation.
There are four types of ranges, created with constructor functions:
@example('collections/range-creating.php')
All range types support contains():
@example('collections/range-containment.php')
Ranges with a lower bound (FromRange and BetweenRange) are iterable:
@example('collections/range-iterating.php')
Ranges can be combined with new bounds to create different range types:
@example('collections/range-manipulating.php')
See src/Psl/Range/ for the full API.
How can I help you explore Laravel packages today?