<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.pharfileinfo.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'pharfileinfo.getcrc32.php',
    1 => 'PharFileInfo::getCRC32',
    2 => 'Returns CRC32 code or throws an exception if CRC has not been verified',
  ),
  'up' => 
  array (
    0 => 'class.pharfileinfo.php',
    1 => 'PharFileInfo',
  ),
  'prev' => 
  array (
    0 => 'pharfileinfo.destruct.php',
    1 => 'PharFileInfo::__destruct',
  ),
  'next' => 
  array (
    0 => 'pharfileinfo.getcompressedsize.php',
    1 => 'PharFileInfo::getCompressedSize',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/phar/PharFileInfo/getCRC32.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="pharfileinfo.getcrc32" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">PharFileInfo::getCRC32</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8, PECL phar &gt;= 1.0.0)</p><p class="refpurpose"><span class="refname">PharFileInfo::getCRC32</span> &mdash; <span class="dc-title">Returns CRC32 code or throws an exception if CRC has not been verified</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-pharfileinfo.getcrc32-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><strong>PharFileInfo::getCRC32</strong></span>(): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>


  <p class="para rdfs-comment">
   This returns the <span class="function"><a href="function.crc32.php" class="function">crc32()</a></span> checksum of the file
   within the Phar archive.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-pharfileinfo.getcrc32-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">Diese Funktion besitzt keine Parameter.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-pharfileinfo.getcrc32-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   The <span class="function"><a href="function.crc32.php" class="function">crc32()</a></span> checksum of the file within the Phar archive.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-pharfileinfo.getcrc32-errors">
  <h3 class="title">Fehler/Exceptions</h3>
  <p class="para">
   Throws <span class="classname"><a href="class.badmethodcallexception.php" class="classname">BadMethodCallException</a></span> if the file has not
   yet had its CRC32 verified.  This should be impossible with normal use, as
   the CRC is verified upon opening the file for reading or writing.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-pharfileinfo.getcrc32-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 A <span class="function"><strong>PharFileInfo::getCRC32()</strong></span> example</strong></p>
    <div class="example-contents"><p>
    </p></div>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">try {<br />    </span><span style="color: #0000BB">$p </span><span style="color: #007700">= new </span><span style="color: #0000BB">Phar</span><span style="color: #007700">(</span><span style="color: #DD0000">'/path/to/my.phar'</span><span style="color: #007700">, </span><span style="color: #0000BB">0</span><span style="color: #007700">, </span><span style="color: #DD0000">'my.phar'</span><span style="color: #007700">);<br />    </span><span style="color: #0000BB">$p</span><span style="color: #007700">[</span><span style="color: #DD0000">'myfile.txt'</span><span style="color: #007700">] = </span><span style="color: #DD0000">'hi'</span><span style="color: #007700">;<br />    </span><span style="color: #0000BB">$file </span><span style="color: #007700">= </span><span style="color: #0000BB">$p</span><span style="color: #007700">[</span><span style="color: #DD0000">'myfile.txt'</span><span style="color: #007700">];<br />    echo </span><span style="color: #0000BB">$file</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getCRC32</span><span style="color: #007700">();<br />} catch (</span><span style="color: #0000BB">Exception $e</span><span style="color: #007700">) {<br />    echo </span><span style="color: #DD0000">'Write operations on my.phar.phar failed: '</span><span style="color: #007700">, </span><span style="color: #0000BB">$e</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt folgende Ausgabe:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">3633523372</pre>
</div>
    </div>
   </div>
  </p>
 </div>


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