re-implemented cycle using a generator
changed implementation to use generator
bugfix
typo
Merge branch 'refs/heads/master' into php-5.5