Oihana Php Masking

randomAlphaNumeric.php

Table of Contents

Functions

randomAlphaNumeric()  : string
Returns a random alphanumeric string of the given length.

Functions

randomAlphaNumeric()

Returns a random alphanumeric string of the given length.

randomAlphaNumeric(int $length) : string

A small building block shared by the string-producing maskers (maskEmail(), maskRandomString(), maskRandom()). It is not meant to be cryptographically reversible — its only purpose is to replace a value with anonymized, readable characters.

Parameters
$length : int

The desired length (clamped to a minimum of 1).

Tags
throws
RandomException
example
use function oihana\masking\randomAlphaNumeric;

randomAlphaNumeric( 4 ); // e.g. "x7Bq"
since
1.0.0
author

Marc Alcaraz

Return values
string
On this page

Search results