Search by

platoniq / random-name-generator

Platoniq

A library to create interesting, sometimes entertaining, random names with multi-language support.

Package info

github.com/Platoniq/random-name-generator

pkg:composer/platoniq/random-name-generator

Statistics

Installs: 36

Dependents: 0

Suggesters: 0

Stars: 1

v1.0 2026-10-13 14:10 UTC

This package is auto-updated.

Last update: 2026-10-14 09:50:54 UTC


README

A PHP library to create interesting, sometimes entertaining, random names with multi-language support.

Requirements

This library requires PHP 5.6, or newer.

Installation

This package uses composer so you can just add platoniq/random-name-generator as a dependency to your composer.json file or execute the following command:

composer require platoniq/random-name-generator

Generators

All

The "all" generator will utilize all other configured generators to generate random names. It will select from the list of generators randomly and then use them to generate a random name using their functionality.

Usage

$generator = \Platoniq\RandomNameGenerator\All::create();
echo $generator->getName();

Alternatively, if you want to configure/build the generators to use instead of using all of the available generators, you can construct them yourself:

$generator = new \Platoniq\RandomNameGenerator\All(
    [
        new \Platoniq\RandomNameGenerator\Alliteration(),
        new \Platoniq\RandomNameGenerator\Vgng()
    ]
);

Video Game Names

The video game name generator is based off of prior art. It will generate unique names based off of "typical" video games.

Examples

  • Kamikaze Bubblegum Warrior
  • Rockin' Valkyrie Gaiden
  • Neurotic Jackhammer Detective
  • My Little Mountain Climber Conflict
  • Small-Time Princess vs. The Space Mutants

You can also use this web example to see more example video game names generated by this library.

Usage

$generator = new \Platoniq\RandomNameGenerator\Vgng();
echo $generator->getName();

Alliterative Names

The alliteration name generator is based off of a list of adjectives and a list of animals.

Examples

  • Agreeable Anaconda
  • Disturbed Duck
  • Misty Meerkat
  • Prickly Pig

Usage

$generator = new \Platoniq\RandomNameGenerator\Alliteration();
echo $generator->getName();

Combination Names

The combination name generator uses the same word lists as the alliteration generator, but pairs any adjective with any noun regardless of their starting letters, so it can produce many more distinct names.

Examples

  • Brave Otter
  • Adorable Gemsbok

Usage

$generator = new \Platoniq\RandomNameGenerator\Combination();
echo $generator->getName();

Languages

The alliteration and combination generators support English (en, default) and Spanish (es). Spanish names put the noun first and only use gender-neutral, positive adjectives and inoffensive animals.

Examples

  • Oso Optimista
  • León Leal
  • Tigre Tenaz

Usage

$generator = new \Platoniq\RandomNameGenerator\Alliteration(null, 'es');
echo $generator->getName();

$generator = new \Platoniq\RandomNameGenerator\Combination(null, 'es'); // e.g. "Nutria Valiente"
echo $generator->getName();

// The video game generator is English-only, so this only uses Alliteration.
$generator = \Platoniq\RandomNameGenerator\All::create(null, 'es');

License

random-name-generator is licensed under the MIT license. See LICENSE for the full license text.