maskInteger.php
Table of Contents
Functions
- maskInteger() : int
- Replaces a value with a random integer in `[lower, upper]`.
Functions
maskInteger()
Replaces a value with a random integer in `[lower, upper]`.
maskInteger([mixed $value = null ][, int $lower = -100 ][, int $upper = 100 ]) : int
Implements the conventional integer masker: the value is replaced whatever
its original type (string, boolean and null included). The bounds are
inclusive; they are swapped if given in the wrong order.
Parameters
- $value : mixed = null
-
The original value (ignored — replaced wholesale).
- $lower : int = -100
-
Smallest value to return.
- $upper : int = 100
-
Largest value to return.