azjezz/psl
PSL is a modern, well-typed standard library for PHP 8.4+, inspired by HHVM’s HSL. It offers safer, predictable APIs for async, collections, networking, I/O, crypto, terminal UI, and robust data validation—replacing brittle built-ins with consistent alternatives.
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?