Function __global->is_alphanumeric
Definitions
sources/type_sanitisation.php
- Find whether the specified string is alphanumeric or not.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $string | string | No | No | required parameter | N/A | N/A | The string to test |
| $strict | boolean | No | No | False | N/A | N/A | Whether to do stricter sanitisation, latin alphanumeric only and no dots |
Returns
- Whether the string is alphanumeric or not
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Find whether the specified string is alphanumeric or not.
*
* @param string $string The string to test
* @param boolean $strict Whether to do stricter sanitisation, latin alphanumeric only and no dots
* @return boolean Whether the string is alphanumeric or not
*/
function is_alphanumeric(string $string, bool $strict = false) : bool
* Find whether the specified string is alphanumeric or not.
*
* @param string $string The string to test
* @param boolean $strict Whether to do stricter sanitisation, latin alphanumeric only and no dots
* @return boolean Whether the string is alphanumeric or not
*/
function is_alphanumeric(string $string, bool $strict = false) : bool

