[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/random_compat/ -> byte_safe_strings.php (summary)

Random_* Compatibility Library for using the new PHP 7 random_* API in PHP 5 projects The MIT License (MIT)

File Size: 195 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 4 functions

  RandomCompat_strlen()
  RandomCompat_strlen()
  RandomCompat_substr()
  RandomCompat_substr()

Functions
Functions that are not part of a class:

RandomCompat_strlen($binary_string)   X-Ref
strlen() implementation that isn't brittle to mbstring.func_overload

This version uses mb_strlen() in '8bit' mode to treat strings as raw
binary rather than UTF-8, ISO-8859-1, etc

param: string $binary_string
return: int

RandomCompat_strlen($binary_string)   X-Ref
strlen() implementation that isn't brittle to mbstring.func_overload

This version just used the default strlen()

param: string $binary_string
return: int

RandomCompat_substr($binary_string, $start, $length = null)   X-Ref
substr() implementation that isn't brittle to mbstring.func_overload

This version uses mb_substr() in '8bit' mode to treat strings as raw
binary rather than UTF-8, ISO-8859-1, etc

param: string $binary_string
param: int $start
param: int|null $length (optional)
return: string

RandomCompat_substr($binary_string, $start, $length = null)   X-Ref
substr() implementation that isn't brittle to mbstring.func_overload

This version just uses the default substr()

param: string $binary_string
param: int $start
param: int|null $length (optional)
return: string



Generated: Sun Jul 9 01:00:02 2023 Cross-referenced by PHPXref 0.7.1