Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

19 lines (14 sloc) 0.93 kb


A reimplementation of Python's zip() function in PHP. Technically, this is a port of izip(), but obtaining an array result is quite trivial thanks to SPL's iterator_to_array() function.

Currently, the iterators return a list truncated to the length of its shortest argument. Support for arguments of uneven length and padding (in the style of izip_longest() and Ruby is on the TODO list.

This library includes two classes for zipping arrays and strings, respectively: ArrayZipIterator and StringZipIterator. Please see the test cases for usage examples until additional documentation is written.

Jump to Line
Something went wrong with that request. Please try again.