略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: sodium_compare

2025-02-27

sodium_compare

(PHP 7 >= 7.2.0, PHP 8)

sodium_compareCompare large numbers

说明

sodium_compare(#[\SensitiveParameter] string $string1, #[\SensitiveParameter] string $string2): int

Compare two strings as if they were arbitrary-length, unsigned little-endian integers, without side-channel leakage.

参数

string1

Left operand

string2

Right operand

返回值

Returns -1 if string1 is less than string2.

Returns 1 if string1 is greater than string2.

Returns 0 if both strings are equal.

添加备注

用户贡献的备注

此页面尚无用户贡献的备注。

官方地址:https://www.php.net/manual/en/function.sodium-compare.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3