BinaryString
in package
Table of Contents
Methods
- constantTimeCompare() : bool
- Equivalent to hash_equals() in PHP 5.6
- length() : int
- Multi-byte-safe string length calculation
- substring() : string
- Multi-byte-safe substring calculation
Methods
constantTimeCompare()
Equivalent to hash_equals() in PHP 5.6
public
static constantTimeCompare(string $knownString, string $userString) : bool
Parameters
- $knownString : string
- $userString : string
Return values
boollength()
Multi-byte-safe string length calculation
public
static length(string $str) : int
Parameters
- $str : string
Return values
intsubstring()
Multi-byte-safe substring calculation
public
static substring(string $str[, int $start = 0 ][, int $length = null ]) : string
Parameters
- $str : string
- $start : int = 0
- $length : int = null
-
(optional)