You are here : phpstringstrncmp

strncmp() - string

This function is similar to strcmp(), with the
   difference that you can specify the (upper limit of the) number of
   characters from each string to be used in the comparison.
Parameters :
  • str1 - The first string.
  • str2 - The second string.
  • len - Number of characters to use in the comparison.

  • Syntax

    int strncmp
        ( string $str1
       , string $str2
       , int $len
       )


    Example


    Output / Return Value


    Limitations


    Alternatives / See Also


    Reference