Common functions for readers and writers.
More...
|
static | unsignedMod ( $a, $b) |
| Take a modulo of a signed integer as if it were an unsigned integer.
|
|
static | unsignedShiftRight ( $a, $b) |
| Shift a signed integer right as if it were unsigned.
|
|
static | hash ( $s) |
| The CDB hash function.
|
|
Common functions for readers and writers.
This is a port of D.J. Bernstein's CDB to PHP. It's based on the copy that appears in PHP 5.3.
◆ hash()
static Cdb\Util::hash |
( |
| $s | ) |
|
|
static |
The CDB hash function.
- Parameters
-
- Returns
- int
◆ unsignedMod()
static Cdb\Util::unsignedMod |
( |
| $a, |
|
|
| $b ) |
|
static |
Take a modulo of a signed integer as if it were an unsigned integer.
$b must be less than 0x40000000 and greater than 0
- Parameters
-
- Returns
- int
◆ unsignedShiftRight()
static Cdb\Util::unsignedShiftRight |
( |
| $a, |
|
|
| $b ) |
|
static |
Shift a signed integer right as if it were unsigned.
- Parameters
-
- Returns
- int
The documentation for this class was generated from the following file: