Syntax Syntax
Parameters Parameters
- $integer
-
(Required)
- $size
-
(Required) (16, 32, 64)
Return Return
(int)
Source Source
File: wp-includes/sodium_compat/src/Core/Util.php
public static function abs($integer, $size = 0) { /** @var int $realSize */ $realSize = (PHP_INT_SIZE << 3) - 1; if ($size) { --$size; } else { /** @var int $size */ $size = $realSize; } $negative = -(($integer >> $size) & 1); return (int) ( ($integer ^ $negative) + (($negative >> $realSize) & 1) ); }