Function __global->strnatcmp

Definitions

sources_custom/phpstub.php

  • String comparisons using a "natural order" algorithm.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$str1 string No No required parameter N/A N/A The first string
$str2 string No No required parameter N/A N/A The second string

Returns

  • <0 if s1<s2, 0 if s1=s2, >1 if s1>s2
  • Type: integer
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * String comparisons using a "natural order" algorithm.
 *
 * @param  string $str1 The first string
 * @param  string $str2 The second string
 * @return integer <0 if s1<s2, 0 if s1=s2, >1 if s1>s2
 */

function strnatcmp(string $str1, string $str2) : int