Power operator can be used

Signed-off-by: Yuriy Pikhtarev <iglix@me.com>
This commit is contained in:
Yuriy Pikhtarev 2018-06-24 15:20:23 +03:00
commit 4bb72dfe59
No known key found for this signature in database
GPG key ID: 3A9B5A757B48ECC6
2 changed files with 2 additions and 2 deletions

View file

@ -68,7 +68,7 @@ function base64_unpack($string)
for ($i = 1; $i <= $length; $i++) {
$pos = $length - $i;
$operand = strpos($chars, $string[$pos]);
$exponent = pow($base, $i - 1);
$exponent = $base ** ($i - 1);
$decValue = $operand * $exponent;
$number += $decValue;
}