\voku\helperBootup

Summary

Methods
Properties
Constants
filterString()
get_random_bytes()
filter_sanitize_string_polyfill()
initAll()
is_php()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

filterString()

filterString(mixed  $input, int  $normalization_form = Normalizer::NFC, string  $leading_combining = '◌') : mixed

Normalizes to UTF-8 NFC, converting from WINDOWS-1252 when needed.

Parameters

mixed $input
int $normalization_form
string $leading_combining

Returns

mixed —

get_random_bytes()

get_random_bytes(int  $length) : false|string

Get random bytes via "random_bytes()"

Parameters

int $length

output length

Throws

\Exception

if it was not possible to gather sufficient entropy

Returns

false|string —

false on error

filter_sanitize_string_polyfill()

filter_sanitize_string_polyfill(string  $str) : false|string

Constant FILTER_SANITIZE_STRING polyfill for PHP > 8.1

INFO: https://stackoverflow.com/a/69207369/1155858

Parameters

string $str

Returns

false|string —

initAll()

initAll() : bool

Returns

bool —

is_php()

is_php(string  $version) : bool

Determines if the current version of PHP is equal to or greater than the supplied value.

Parameters

string $version

e.g. "7.1"

Returns

bool —

Return true if the current version is $version or greater.