coolstudio / words-php
A collection of word lists for various categories and languages
1.0.4
2025-03-14 19:17 UTC
Requires
- php: >=7.2.0
Requires (Dev)
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2025-06-14 20:51:18 UTC
README
A PHP library containing word lists for various categories and languages. This library is generated from the cool-studio/words repository.
Installation
You can install the package via composer:
composer require words-studio/words-php
Usage
Getting all words in a list
use Words\EN\Animals; // Get all words $allAnimals = Animals::words();
Getting a random word
use Words\EN\Animals; // Get a random word $randomAnimal = Animals::word();
Available Word Lists
The library includes the following word lists:
English (EN)
- Animals
- SciFi
- Space
- Tech
- Words (General words)
Generating/Updating Word Lists
Word lists are generated from the cool-studio/words repository. To update the word lists or generate new ones:
- Make sure you have Node.js installed
- Run the generation script:
node generate.js
This will:
- Clone or update the words repository
- Generate PHP classes for each word list
- Update the version in composer.json
License
This project is licensed under the MIT License - see the LICENSE file for details.