strnatcmp
strnatcmp
(PHP 4, PHP 5, PHP 7)
strnatcmp — String comparisons using a "natural order" algorithm
Description
int strnatcmp ( string $str1 , string $str2 )
This function implements a comparison algorithm that orders alphanumeric strings in the way a human being would, this is described as a "natural ordering". Note that this comparison is case sensitive.
Parameters
-
str1
-
The first string.
-
str2