PHPackages                             navisborealis/wonderwords-php - 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. navisborealis/wonderwords-php

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

navisborealis/wonderwords-php
=============================

Generate random words and sentences with ease in PHP.

v1.0.0(2y ago)1540MITPHPPHP ^7.1 || ^8.0

Since Nov 7Pushed 2y ago1 watchersCompare

[ Source](https://github.com/navisborealis/wonderwords-php)[ Packagist](https://packagist.org/packages/navisborealis/wonderwords-php)[ Docs](https://github.com/navisborealis/wonderwords-php)[ RSS](/packages/navisborealis-wonderwords-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

[![Github Tests Action Status](https://github.com/navisborealis/wonderwords-php/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/navisborealis/wonderwords-php/actions/workflows/unit-tests.yml)[![Latest Version on Packagist](https://camo.githubusercontent.com/513c4183ca24b4919b44d9882b348b73cd2a7e214df133f329bd9b76c0683fe0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e61766973626f7265616c69732f776f6e646572776f7264732d7068702e737667)](https://packagist.org/packages/navisborealis/wonderwords-php)[![Total Downloads](https://camo.githubusercontent.com/bc6bf411a38ba1dd5e820fa56435860b4fd26669fb60445bfd42e111f5bc11a5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e61766973626f7265616c69732f776f6e646572776f7264732d7068702e737667)](https://packagist.org/packages/navisborealis/wonderwords-php)

Wonderwords PHP
===============

[](#wonderwords-php)

Generate random words, phrases and sentences with ease in PHP.

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

[](#installation)

To install the package, run the following command:

```
composer require navisborealis/wonderwords-php
```

Usage
-----

[](#usage)

With this library you can generate:

- words - adjectives, nouns or verbs
- phrases - 1+ adjective and 1+ noun, like `Blushing Inspection`
- sentences - this feature is still in development

### Phrases

[](#phrases)

Basic structure of the phrase is `adjective noun`. You can change:

- string separator, default ` `,
- number of adjectives and nouns, default `1`,
- function used to modify the letters case, default `ucwords()`.

To use your own list of words see [Changing default word list](#changing-default-word-list).

```
phrase(
        string $separator = ' ',
        int $numAdjectives = 1,
        int $numNouns = 1,
        callable $stringCaseFunction = null)
```

#### Generic, two word, space separated phrase

[](#generic-two-word-space-separated-phrase)

```
use NavisBorealis\WonderwordsPhp\WonderWordsGenerator;

echo WonderWordsGenerator::phrase(); // Output: Blushing Inspection
```

#### Custom separator

[](#custom-separator)

```
use NavisBorealis\WonderwordsPhp\WonderWordsGenerator;

echo WonderWordsGenerator::phrase('-'); // Output: Blushing-Inspection
```

#### Different number of adjectives and nouns

[](#different-number-of-adjectives-and-nouns)

```
use NavisBorealis\WonderwordsPhp\WonderWordsGenerator;

echo WonderWordsGenerator::phrase(' ', 2, 3); // Output: Receptive Weary Disease Motive Vegetarian
```

#### Custom function to change letters casing

[](#custom-function-to-change-letters-casing)

```
use NavisBorealis\WonderwordsPhp\WonderWordsGenerator;

echo WonderWordsGenerator::phrase(' ', 1, 1, 'strtoupper'); // Output: BLUSHING INSPECTION
```

```
use NavisBorealis\WonderwordsPhp\WonderWordsGenerator;

echo WonderWordsGenerator::phrase(' ', 1, 1, function ($phrase) {
    return ucfirst($phrase);
}); // Output: Blushing inspection
```

### Words

[](#words)

#### Generating words

[](#generating-words)

From each category (`Adjective`, `Noun`, `Verb`) you can generate a single word:

```
use NavisBorealis\WonderwordsPhp\Words\Adjective;

echo Adjective::randomWord(); // Output: various
```

or an array of words:

```
use NavisBorealis\WonderwordsPhp\Words\Adjective;

$words = Adjective::randomWords(5); // ["innate", "noiseless", "screeching", "sloppy", "squeamish"]
```

#### Changing default word list

[](#changing-default-word-list)

For each word category (`Adjective`, `Noun`, `Verb`) you can change the default word list:

```
use NavisBorealis\WonderwordsPhp\WonderWordsGenerator;
use NavisBorealis\WonderwordsPhp\Words\Adjective;

Adjective::setWordList(['customadjective1', 'customadjective2']);

echo WonderWordsGenerator::phrase(); // Output: Customadjective2 Inspection
```

also, you can reset word list to its defaults:

```
use NavisBorealis\WonderwordsPhp\WonderWordsGenerator;
use NavisBorealis\WonderwordsPhp\Words\Adjective;

Adjective::setWordList(['customadjective1', 'customadjective2']);

echo WonderWordsGenerator::phrase(); // Output: Customadjective2 Inspection

Adjective::reset();

echo WonderWordsGenerator::phrase(); // Output: Scientific Inspection
```

### Sentences

[](#sentences)

In development...

Credits
-------

[](#credits)

Wonderwords PHP is based on `wonderwordsmodule` python module and has been made possible thanks to the following works:

- [`wonderwordsmodule` for python](https://github.com/mrmaxguns/wonderwordsmodule) under the [MIT License](https://github.com/mrmaxguns/wonderwordsmodule/blob/master/LICENSE)
- `profanitylist.txt` from [RobertJGabriel/Google-profanity-words](https://github.com/RobertJGabriel/Google-profanity-words)under the [Apache-2.0 license](https://github.com/RobertJGabriel/Google-profanity-words/blob/master/LICENSE)
- [PhraseGenerator](https://github.com/samuelwilliams/PhraseGenerator) under the [MIT License](https://github.com/samuelwilliams/PhraseGenerator/blob/master/LICENSE)
- [word-generator](https://github.com/claudiodekker/word-generator/) under the [MIT license](https://github.com/claudiodekker/word-generator/blob/master/LICENSE.md)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

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

923d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a8f4af0d2a971ff7e52866b96c0ab73d3b5ec75044b85873f8f734b7786f599?d=identicon)[piotrgradzinski](/maintainers/piotrgradzinski)

---

Top Contributors

[![piotrgradzinski](https://avatars.githubusercontent.com/u/1607439?v=4)](https://github.com/piotrgradzinski "piotrgradzinski (11 commits)")

---

Tags

generatorwordnounadjectivephrase

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/navisborealis-wonderwords-php/health.svg)

```
[![Health](https://phpackages.com/badges/navisborealis-wonderwords-php/health.svg)](https://phpackages.com/packages/navisborealis-wonderwords-php)
```

###  Alternatives

[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M568](/packages/symfony-maker-bundle)[simplesoftwareio/simple-qrcode

Simple QrCode is a QR code generator made for Laravel.

2.9k27.6M92](/packages/simplesoftwareio-simple-qrcode)[claudiodekker/word-generator

Generates random words by combining adjectives and nouns

4155.2k2](/packages/claudiodekker-word-generator)[riimu/kit-phpencoder

Highly customizable alternative to var\_export for PHP code generation

717.8M32](/packages/riimu-kit-phpencoder)[butschster/cron-expression-generator

Cron expression generator

511.4M2](/packages/butschster-cron-expression-generator)

PHPackages © 2026

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