Summery Summery
Load a 3 character substring into an integer
Syntax Syntax
Parameters Parameters
- $string
-
(Required)
Return Return
(int)
Source Source
File: wp-includes/sodium_compat/src/Core/Util.php
public static function load_3($string) { /* Type checks: */ if (!is_string($string)) { throw new TypeError('Argument 1 must be a string, ' . gettype($string) . ' given.'); } /* Input validation: */ if (self::strlen($string) < 3) { throw new RangeException( 'String must be 3 bytes or more; ' . self::strlen($string) . ' given.' ); } /** @var array<int, int> $unpacked */ $unpacked = unpack('V', $string . "\0"); return (int) ($unpacked[1] & 0xffffff); }