maskRandom.php
Table of Contents
Functions
- maskRandom() : mixed
- Replaces a leaf value with a random value of the **same kind**.
Functions
maskRandom()
Replaces a leaf value with a random value of the **same kind**.
maskRandom(mixed $value) : mixed
Implements the conventional random masker:
- strings → a random string (see maskRandomString()) ;
- integers → a random integer between -1000 and 1000 ;
- floats → a random decimal between -1000 and 1000 ;
- booleans → a random boolean ;
null→ staysnull.
Parameters
- $value : mixed
-
The original value.
Tags
Return values
mixed —The randomized value, type-preserved.