PHPackages                             johnkary/rethinking-loops - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. johnkary/rethinking-loops

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

johnkary/rethinking-loops
=========================

Supplemental code and practice katas for John Kary’s talk Rethinking Loops.

v1.0.0(10y ago)46[1 issues](https://github.com/johnkary/rethinkingloops/issues)MITCSSPHP &gt;=5.6.0

Since Mar 5Pushed 8y ago2 watchersCompare

[ Source](https://github.com/johnkary/rethinkingloops)[ Packagist](https://packagist.org/packages/johnkary/rethinking-loops)[ RSS](/packages/johnkary-rethinking-loops/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (2)Used By (0)

Rethinking Loops
================

[](#rethinking-loops)

Playground for ideas presented in John Kary's talk [Rethinking Loops](http://johnkary.net/talks/#rethinking-loops). Can you implement these kata's without using loops? Without control statements?

Viewing Slides
--------------

[](#viewing-slides)

```
$ git clone https://github.com/johnkary/rethinkingloops.git rethinkingloops
$ cd !$
$ php -S 127.0.0.1:4000 -t slides/
$ open http://127.0.0.1:4000
```

Install for working on katas
----------------------------

[](#install-for-working-on-katas)

Create a new project based on this project using [Composer](https://getcomposer.org/).

```
$ composer create-project johnkary/rethinking-loops
$ cd rethinking-loops
```

Writing Katas
-------------

[](#writing-katas)

Run the unit tests. The failing tests show which katas you have yet to implement:

```
$ vendor/bin/phpunit
```

Open your editor and begin hacking on one of the katas.

- Fizz Buzz
    - Haystack\\FizzBuzz
- Some other kata?

Re-run the unit tests. If tests pass your implementation works!

Kata: FizzBuzz
--------------

[](#kata-fizzbuzz)

Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz".

Run all tests for Fizz Buzz.

```
$ vendor/bin/phpunit tests/FizzBuzzTest.php
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3718d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/135607?v=4)[John Kary](/maintainers/johnkary)[@johnkary](https://github.com/johnkary)

---

Top Contributors

[![johnkary](https://avatars.githubusercontent.com/u/135607?v=4)](https://github.com/johnkary "johnkary (48 commits)")[![ericpoe](https://avatars.githubusercontent.com/u/1981351?v=4)](https://github.com/ericpoe "ericpoe (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/johnkary-rethinking-loops/health.svg)

```
[![Health](https://phpackages.com/badges/johnkary-rethinking-loops/health.svg)](https://phpackages.com/packages/johnkary-rethinking-loops)
```

###  Alternatives

[simshaun/recurr

PHP library for working with recurrence rules

1.6k15.7M40](/packages/simshaun-recurr)[alchemy/zippy

Zippy, the archive manager companion

47522.6M51](/packages/alchemy-zippy)[commerceguys/tax

Tax library with a flexible data model, predefined tax rates, powerful resolving logic.

286763.3k](/packages/commerceguys-tax)[cron/cron-bundle

Symfony cron

1901.5M2](/packages/cron-cron-bundle)[sonata-project/classification-bundle

Symfony SonataClassificationBundle

913.2M20](/packages/sonata-project-classification-bundle)[sylius/promotion

Flexible promotion management for PHP applications.

28477.8k9](/packages/sylius-promotion)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
