HH\Lib\Str\compare_ci

Requires the Hack Standard Library to be installed.
Facebook Engineer?

This function is available as Str\compare_ci() in Facebook's www repository.

Returns < 0 if $string1 is less than $string2, > 0 if $string1 is greater than $string2, and 0 if they are equal (case-insensitive)

namespace HH\Lib\Str;

function compare_ci(
  string $string1,
  string $string2,
): int;

For a case-sensitive comparison, see Str\compare().

Parameters

  • string $string1
  • string $string2

Returns

  • int