<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.filesystem.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.pclose.php',
    1 => 'pclose',
    2 => 'Closes process file pointer',
  ),
  'up' => 
  array (
    0 => 'ref.filesystem.php',
    1 => 'Функції Файлової Системи',
  ),
  'prev' => 
  array (
    0 => 'function.pathinfo.php',
    1 => 'pathinfo',
  ),
  'next' => 
  array (
    0 => 'function.popen.php',
    1 => 'popen',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/filesystem/functions/pclose.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.pclose" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">pclose</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">pclose</span> &mdash; <span class="dc-title">Closes process file pointer</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.pclose-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>pclose</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$handle</code></span>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>

  <p class="para rdfs-comment">
   Closes a file pointer to a pipe opened by <span class="function"><a href="function.popen.php" class="function">popen()</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.pclose-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">handle</code></dt>
     <dd>
      <p class="para">
       The file pointer must be valid, and must have been returned by a
       successful call to <span class="function"><a href="function.popen.php" class="function">popen()</a></span>.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.pclose-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Returns the termination status of the process that was run. In case of 
   an error then <code class="literal">-1</code> is returned.
  </p>
  <blockquote class="note"><p><strong class="note">Зауваження</strong>: 
 <p class="para">
  Якщо PHP скомпільовано з --enable-sigchild, значення, що повертається цією
  функцією, не визначене.
 </p>
</p></blockquote>

 </div>


 <div class="refsect1 examples" id="refsect1-function.pclose-examples">
  <h3 class="title">Приклади</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Приклад #1 <span class="function"><strong>pclose()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$handle </span><span style="color: #007700">= </span><span style="color: #0000BB">popen</span><span style="color: #007700">(</span><span style="color: #DD0000">'/bin/ls'</span><span style="color: #007700">, </span><span style="color: #DD0000">'r'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">pclose</span><span style="color: #007700">(</span><span style="color: #0000BB">$handle</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

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


 <div class="refsect1 notes" id="refsect1-function.pclose-notes">
  <h3 class="title">Примітки</h3>
  <blockquote class="note"><p><strong class="note">Зауваження</strong>: 
   <strong>Unix Only:</strong><br />
   <p class="para">
    <span class="function"><strong>pclose()</strong></span> is internally implemented using the 
    <code class="literal">waitpid(3)</code> system call. To obtain the real exit 
    status code the <span class="function"><a href="function.pcntl-wexitstatus.php" class="function">pcntl_wexitstatus()</a></span> function 
    should be used.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.pclose-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.popen.php" class="function" rel="rdfs-seeAlso">popen()</a> - Opens process file pointer</span></li>
   </ul>
  </p>
 </div>


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