From any *NIX machine, simply type:
pecl install xrange
If there are any problems, please use the PHP bug tracking system available from the PECL project page at: http://pecl.php.net/package/xrange
xrange has a new source code repository. Future updates will be performed at the new location.
For latest development tree, try:
cvs -d :pserver:cvsread@cvs.php.net:/repository checkout pecl/xrange
xrange is moving to PECL and the main CVS tree. The project page will be updated when the transition is complete.
The latest code in SVN includes three basic filters scheduled for the 1.3 release. They are:
- OddFilterIterator
- EvenFilterIterator
- NumericFilterIterator
Their usage should be fairly self-explanatory. Simply construct them outside another iterator and they will filter the output accordingly. They work with the SeekableIterator interface & SPL's LimitIterator.
More filters are coming, but I decided to get the easy ones out of the way first. Developers that are able to build from the source tree are encouraged to build & "make test" on their platforms.
When migrating from CVS, I failed to use a "branch friendly" tree structure. It's been corrected so that all versions, starting with 1.2, will be tagged.
svn co http://xrange.svn.sourceforge.net/svnroot/xrange/trunk xrange