crowdstar / ranger
Ranger allows you to mimic the range function in PHP as an Iterator, conserving memory for large ranges.
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/crowdstar/ranger
Requires
- php: >=5.3
Requires (Dev)
- phpunit/phpunit: >=4.8
- squizlabs/php_codesniffer: >=2.0
This package is auto-updated.
Last update: 2024-06-26 06:25:01 UTC
README
Ranger allows you to mimic the range function in PHP as an Iterator, conserving memory for large ranges.
Installation
composer require crowdstar/ranger:~1.0.0
Sample Usage
Old way
<?php foreach (range(1, 100000) as $number) { echo $number; }
New way
<?php use CrowdStar\Iterators\Ranger; $range = Ranger::start(1, 100000); foreach ($range as $number) { echo $number; }