<?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.strrev.php',
    1 => 'strrev',
    2 => 'Reverse a string',
  ),
  'up' => 
  array (
    0 => 'ref.strings.php',
    1 => 'String Functions',
  ),
  'prev' => 
  array (
    0 => 'function.strrchr.php',
    1 => 'strrchr',
  ),
  'next' => 
  array (
    0 => 'function.strripos.php',
    1 => 'strripos',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/strings/functions/strrev.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.strrev" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">strrev</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">strrev</span> &mdash; <span class="dc-title">Reverse a string</span></p>

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

  <p class="para rdfs-comment">
   Returns <code class="parameter">string</code>, reversed.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.strrev-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">string</code></dt>
     <dd>
      <p class="para">
       The string to be reversed.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.strrev-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns the reversed string.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.strrev-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Example #1 Reversing a string with <span class="function"><strong>strrev()</strong></span></strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">strrev</span><span style="color: #007700">(</span><span style="color: #DD0000">"Hello world!"</span><span style="color: #007700">); </span><span style="color: #FF8000">// outputs "!dlrow olleH"<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>   
 </div>


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