Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.
/ ranger Public archive

Ranger allows you to mimic the range function in PHP as an Iterator, conserving memory for large ranges.

License

Notifications You must be signed in to change notification settings

Crowdstar/ranger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

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;
}

About

Ranger allows you to mimic the range function in PHP as an Iterator, conserving memory for large ranges.

Resources

License

Stars

Watchers

Forks

Languages