← All built-ins / strncasecmp()

strncasecmp()

strncasecmp(...$args): int

Parameters

NameTypeDescription
$astringfirst string
$bstringsecond string
$nintmaximum bytes to compare

Return value

Case-insensitive strncmp().

Example

echo strncasecmp("HOLYphp", "holyPHP", 4);
0

See also

strcasecmp()strncmp()