[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

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: 181 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 $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 $length (optional)
return: string



Generated: Sat Nov 23 20:47:33 2019 Cross-referenced by PHPXref 0.7