<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.strings.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'function.strcoll.php',
    1 => 'strcoll',
    2 => 'Locale based string comparison',
  ),
  'up' => 
  array (
    0 => 'ref.strings.php',
    1 => 'String Functions',
  ),
  'prev' => 
  array (
    0 => 'function.strcmp.php',
    1 => 'strcmp',
  ),
  'next' => 
  array (
    0 => 'function.strcspn.php',
    1 => 'strcspn',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/strings/functions/strcoll.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.strcoll" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">strcoll</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.5, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">strcoll</span> &mdash; <span class="dc-title">Locale based string comparison</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.strcoll-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>strcoll</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$string1</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$string2</code></span>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>

  <p class="para rdfs-comment">
   Note that this comparison is case sensitive, and unlike
   <span class="function"><a href="function.strcmp.php" class="function">strcmp()</a></span> this function is not binary safe.
  </p>
  <p class="para">
   <span class="function"><strong>strcoll()</strong></span> uses the current locale for doing the
   comparisons.  If the current locale is C or POSIX, this function is
   equivalent to <span class="function"><a href="function.strcmp.php" class="function">strcmp()</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.strcoll-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">string1</code></dt>
     <dd>
      <p class="para">
       The first string.
      </p>
     </dd>
    
    
     <dt><code class="parameter">string2</code></dt>
     <dd>
      <p class="para">
       The second string.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.strcoll-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns &lt; 0 if <code class="parameter">string1</code> is less than
   <code class="parameter">string2</code>; &gt; 0 if
   <code class="parameter">string1</code> is greater than
   <code class="parameter">string2</code>, and 0 if they are equal.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.strcoll-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.preg-match.php" class="function" rel="rdfs-seeAlso">preg_match()</a> - Perform a regular expression match</span></li>
    <li><span class="function"><a href="function.strcmp.php" class="function" rel="rdfs-seeAlso">strcmp()</a> - Binary safe string comparison</span></li>
    <li><span class="function"><a href="function.strcasecmp.php" class="function" rel="rdfs-seeAlso">strcasecmp()</a> - Binary safe case-insensitive string comparison</span></li>
    <li><span class="function"><a href="function.substr.php" class="function" rel="rdfs-seeAlso">substr()</a> - Return part of a string</span></li>
    <li><span class="function"><a href="function.stristr.php" class="function" rel="rdfs-seeAlso">stristr()</a> - Case-insensitive strstr</span></li>
    <li><span class="function"><a href="function.strncasecmp.php" class="function" rel="rdfs-seeAlso">strncasecmp()</a> - Binary safe case-insensitive string comparison of the first n characters</span></li>
    <li><span class="function"><a href="function.strncmp.php" class="function" rel="rdfs-seeAlso">strncmp()</a> - Binary safe string comparison of the first n characters</span></li>
    <li><span class="function"><a href="function.strstr.php" class="function" rel="rdfs-seeAlso">strstr()</a> - Find the first occurrence of a string</span></li>
    <li><span class="function"><a href="function.setlocale.php" class="function" rel="rdfs-seeAlso">setlocale()</a> - Set locale information</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>