哈希空间 Ctrl + F 进行搜索
首页 php手册中文版 CSS中文手册 哈希文档 Markdown在线工具

PHP sodium 组件

sodium_compare

(PHP 7 >= 7.2.0, PHP 8)

sodium_compareCompare large numbers

说明

sodium_compare(string $string1, 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.

打开 哈希空间 微信小程序中查看更佳