PHP TokenPhrase Generator

Based up on this TokenPhrase Ruby Gem I decided to quickly write a PHP variant of it. With it, one can generate unique phrases for you to use in your app as tokens.

<?php

require_once __DIR__ . '/../src/autoload.php';

for ($i = 0; $i < 10; $i++) {
    echo TokenPhrase\TokenPhrase::generate() . PHP_EOL;
}

The resulting output of the code above is:

ultimate-green-plaid-flag-7931477
established-jade-glossy-chandelier-6865089
american-brown-cracked-greyhound-8705385
american-coral-plaid-chandelier-4983392
groovy-black-argyle-tapir-5503024
governing-chiffon-matte-computer-7901794
liberal-burnt-orange-honeycomb-racoon-1661306
grass-fed-white-spotted-carpenter-0664544
sweet-forest-green-spotted-computer-8211815
ultimate-black-spotted-floppy-disk-2037213

TokenPhrase →

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.