galvao/random-string

A Random String generator based on character classes, with the possibility of excluding specific characters.

Maintainers

Package info

github.com/galvao/RandomString

pkg:composer/galvao/random-string

Statistics

Installs: 6

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-master 2015-12-28 15:00 UTC

This package is auto-updated.

Last update: 2026-03-01 00:21:22 UTC


README

A Random String generator based on character classes, with the possibility of excluding specific characters.

END OF LIFE

As of PHP7 there are far better (and native!) ways of generating random data. Please check http://php.net/manual/en/ref.csprng.php

This repo will remain as example material.

Usage

<?php
use RandomString\RandomString;

// Generates a 12 character string with lowercase letters and symbols, excluding the backslash and pipe chracters.
$str = new RandomString(12, array('lowerCase', 'symbols'), array('\\', '|'));
echo $str->result;