PHPackages                             oliverklee/anagram-finder - 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. oliverklee/anagram-finder

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

oliverklee/anagram-finder
=========================

A tool for finding anagrams from a list of words (as an exercise of test-driven development).

06[3 issues](https://github.com/oliverklee-de/anagram-finder/issues)[1 PRs](https://github.com/oliverklee-de/anagram-finder/pulls)PHPCI passing

Since Dec 12Pushed 2w ago1 watchersCompare

[ Source](https://github.com/oliverklee-de/anagram-finder)[ Packagist](https://packagist.org/packages/oliverklee/anagram-finder)[ RSS](/packages/oliverklee-anagram-finder/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependenciesVersions (5)Used By (0)

Anagram finder
==============

[](#anagram-finder)

This tool is the result of an exercise (code kata, coding dojo) for test-driven development (TDD) for PHP using PHPUnit at Oliver Klee's workshops.

An anagram is pair of two words that consist of exactly the same letters, but in different order.

Example: anthologise, theologians

The dictionaries have been copied from the [most-common-words-by-language](https://github.com/oprogramador/most-common-words-by-language)project.

Installation
------------

[](#installation)

Run `composer install` to install the required Composer packages.

How to run it
-------------

[](#how-to-run-it)

```
bin/find-anagrams
```

You can also specify a dictionary to use from `resources/dictionaries/`:

```
bin/find-anagrams german.txt
```

The exercises
-------------

[](#the-exercises)

The big picture is this: "Find and output all anagrams from a text file with a list of words."

1. Create a class that reads a list of words from a file and returns it as an array.
2. Create a class that takes a word and sorts the characters.
3. Create a class that finds and returns the anagram from an array of words.
4. Deal with duplicates and empty lines in the file gracefully.
5. Find the anagrams in a case-insensitive way.
6. Sort the anagrams alphabetically during output.

About me (Oliver Klee)
----------------------

[](#about-me-oliver-klee)

I am the maintainer of the [PHPUnit TYPO3 extension](http://typo3.org/extensions/repository/view/phpunit), which is available in the TYPO3 extension repository (TER).

You can book me for [workshops](https://www.oliverklee.de/workshops/workshops.html)at your company.

I also frequently give workshops at the TYPO3 Developer Days.

More Documentation
------------------

[](#more-documentation)

- [Handout to my workshops on test-driven development (TDD)](https://github.com/oliverklee-de/tdd-reader)

Other example projects
----------------------

[](#other-example-projects)

- [Coffee example](https://github.com/oliverklee-de/coffee)is my starting point for demonstrating TDD
- [Tea example](https://github.com/oliverklee-de/tea-for-workshops)for testing Extbase TYPO3 extensions

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance63

Regular maintenance activity

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 Bus Factor1

Top contributor holds 71.6% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/2cc98eb6580d4532340e818ea893009da65365b7f3525f518d143732e838735a?d=identicon)[oliverklee](/maintainers/oliverklee)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (330 commits)")[![oliverklee](https://avatars.githubusercontent.com/u/765746?v=4)](https://github.com/oliverklee "oliverklee (120 commits)")[![AnReiter](https://avatars.githubusercontent.com/u/234920694?v=4)](https://github.com/AnReiter "AnReiter (11 commits)")

### Embed Badge

![Health badge](/badges/oliverklee-anagram-finder/health.svg)

```
[![Health](https://phpackages.com/badges/oliverklee-anagram-finder/health.svg)](https://phpackages.com/packages/oliverklee-anagram-finder)
```

###  Alternatives

[rezzza/accounting

Accounting utilities

2215.3k](/packages/rezzza-accounting)

PHPackages © 2026

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