ParagonIE_Sodium_Compat::compare

SummerySummery

Compare two strings, in constant-time.

Syntax

ParagonIE_Sodium_Compat::compare( string $left, string $right )

DescriptionDescription

Compared to memcmp(), compare() is more useful for sorting.

ParametersParameters

$left

(string) (Required) The left operand; must be a string

$right

(string) (Required) The right operand; must be a string

ReturnReturn

(int) If < 0 if the left operand is less than the right If = 0 if both strings are equal If > 0 if the right operand is less than the left

SourceSource

File: wp-includes/sodium_compat/src/Compat.php


			
Scroll to Top