jlaso / iterators
Several iterators
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/jlaso/iterators
Requires
- php: >=5.6
Requires (Dev)
- phpunit/phpunit: ^5.5
This package is auto-updated.
Last update: 2025-09-15 12:25:39 UTC
README
installation
composer require jlaso/itearators
variable-iterator
simplifies the use of a complex array to iterate over all the possibilities
how to use
use JLaso\Iterators\VariableIterator; $iterator = new VariableIterator([ 'genre' => ['W', 'M', '?'], 'ages' => ['18-25', '26-58', '+59'], 'profession' => ['engineer', 'services', 'others'], 'holidays' => ['none', '1-10', '+10'], ]); foreach ($iterator as $item) { // you have in every $item the current mix of variations }
unit testing
vendor/bin/phpunit