PHP Classes

Random Word: Generate a random readable word

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 58%Total: 1,054 All time: 3,515 This week: 51Up
Version License PHP version Categories
rand_word 2.0.0GNU General Publi...8.2Text processing
Description 

Author

This class can be used to generate a random readable word.

It can generate a word of a given length starting with a consonant followed by alternating vowels and consonants to make the generated word more readable.

The generated word may be adjusted to include lower case letters, upper case letters, or have only the first letter in upper case.

Picture of Eric Sizemore
  Performance   Level  
Name: Eric Sizemore <contact>
Classes: 18 packages by
Country: United States United States
Innovation award
Innovation award
Nominee: 5x

Winner: 3x

Example

<?php

/**
* @author Eric Sizemore <admin@secondversion.com>
* @package Random Word
* @version 2.0.0
* @copyright 2006 - 2023 Eric Sizemore
* @license GNU GPL
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/

require_once './rand_word.class.php';

use
Esi\Rand\Word;

$randWord = Word::getInstance();

/**
* generate() accepts the following parameters
* length, use lowercase (true/false), ucfirst (true/false), use uppercase (true/false)
* the below would output something similar to: Bynug
*/
$word = $randWord->generate(5, false, true);
echo
$word;


  Files folder image Files (2)  
File Role Description
Plain text file rand_word.class.php Class The class file
Accessible without login Plain text file example.php Example Example usage

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,054
This week:0
All time:3,515
This week:51Up
User Ratings User Comments (1)
 All time
Utility:83%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:-
Examples:83%StarStarStarStarStar
Tests:-
Videos:-
Overall:58%StarStarStar
Rank:1476
 
Excellent
15 years ago (kishore kumar)
70%StarStarStarStar