<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.ziparchive.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'ziparchive.statindex.php',
    1 => 'ZipArchive::statIndex',
    2 => 'Get the details of an entry defined by its index',
  ),
  'up' => 
  array (
    0 => 'class.ziparchive.php',
    1 => 'ZipArchive',
  ),
  'prev' => 
  array (
    0 => 'ziparchive.setpassword.php',
    1 => 'ZipArchive::setPassword',
  ),
  'next' => 
  array (
    0 => 'ziparchive.statname.php',
    1 => 'ZipArchive::statName',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/zip/ziparchive/statindex.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="ziparchive.statindex" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ZipArchive::statIndex</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.2.0, PHP 7, PHP 8, PECL zip &gt;= 1.1.0)</p><p class="refpurpose"><span class="refname">ZipArchive::statIndex</span> &mdash; <span class="dc-title">Get the details of an entry defined by its index</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-ziparchive.statindex-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ZipArchive::statIndex</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$index</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$flags</code><span class="initializer"> = 0</span></span>): <span class="type"><span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
    The  function  obtains  information  about the entry defined by its
    index.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-ziparchive.statindex-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">index</code></dt>
     <dd>
      <p class="para">
       Index of the entry
      </p>
     </dd>
    
    
     <dt><code class="parameter">flags</code></dt>
     <dd>
      <p class="para">
       <strong><code><a href="zip.constants.php#ziparchive.constants.fl-unchanged">ZipArchive::FL_UNCHANGED</a></code></strong> may be ORed to it to request
       information  about  the  original  file  in  the archive,
       ignoring any changes made.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-ziparchive.statindex-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns an array containing the entry details or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> on failure.
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-ziparchive.statindex-examples">
  <h3 class="title">Examples</h3>
    <div class="example" id="example-1">
     <p><strong>Example #1 Dump the stat info of an entry</strong></p>
     <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$zip </span><span style="color: #007700">= new </span><span style="color: #0000BB">ZipArchive</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$res </span><span style="color: #007700">= </span><span style="color: #0000BB">$zip</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">open</span><span style="color: #007700">(</span><span style="color: #DD0000">'test.zip'</span><span style="color: #007700">);<br />if (</span><span style="color: #0000BB">$res </span><span style="color: #007700">=== </span><span style="color: #0000BB">TRUE</span><span style="color: #007700">) {<br />    </span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$zip</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">statIndex</span><span style="color: #007700">(</span><span style="color: #0000BB">3</span><span style="color: #007700">));<br />    </span><span style="color: #0000BB">$zip</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">close</span><span style="color: #007700">();<br />} else {<br />    echo </span><span style="color: #DD0000">'failed, code:' </span><span style="color: #007700">. </span><span style="color: #0000BB">$res</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
     </div>

      <div class="example-contents"><p>The above example will output
something similar to:</p></div>
     <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Array
(
    [name] =&gt; foobar/baz
    [index] =&gt; 3
    [crc] =&gt; 499465816
    [size] =&gt; 27
    [mtime] =&gt; 1123164748
    [comp_size] =&gt; 24
    [comp_method] =&gt; 8
)</pre>
</div>
     </div>

    </div>

   </div>

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