<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.exec.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.proc-nice.php',
    1 => 'proc_nice',
    2 => 'Change the priority of the current process',
  ),
  'up' => 
  array (
    0 => 'ref.exec.php',
    1 => 'Program execution Функції',
  ),
  'prev' => 
  array (
    0 => 'function.proc-get-status.php',
    1 => 'proc_get_status',
  ),
  'next' => 
  array (
    0 => 'function.proc-open.php',
    1 => 'proc_open',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/exec/functions/proc-nice.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.proc-nice" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">proc_nice</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">proc_nice</span> &mdash; <span class="dc-title">Change the priority of the current process</span></p>

 </div>

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

  <p class="para rdfs-comment">
   <span class="function"><strong>proc_nice()</strong></span> changes the priority of the current
   process by the amount specified in <code class="parameter">priority</code>. A
   positive <code class="parameter">priority</code> will lower the priority of the
   current process, whereas a negative <code class="parameter">priority</code>
   will raise the priority.
  </p>
  <p class="para">
   <span class="function"><strong>proc_nice()</strong></span> is not related to
   <span class="function"><a href="function.proc-open.php" class="function">proc_open()</a></span> and its associated functions in any way.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.proc-nice-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">priority</code></dt>
     <dd>
      <p class="para">
       The new priority value, the value of this may differ on platforms.
      </p>
      <p class="para">
       On Unix, a low value, such as <code class="literal">-20</code> means high priority 
       whereas positive values have a lower priority.
      </p>
      <p class="para">
       For Windows the <code class="parameter">priority</code> parameter has the 
       following meaning:
      </p>
      <table class="doctable informaltable">
       
        <thead>
         <tr>
          <th>Priority class</th>
          <th>Possible values</th>
         </tr>

        </thead>

        <tbody class="tbody">
         <tr>
          <td style="vertical-align: top;">High priority</td>
          <td style="vertical-align: top;">
           <code class="parameter">priority</code> <code class="literal">&lt; -9</code>
          </td>
         </tr>

         <tr>
          <td style="vertical-align: top;">Above normal priority</td>
          <td style="vertical-align: top;">
           <code class="parameter">priority</code> <code class="literal">&lt; -4</code>
          </td>
         </tr>

         <tr>
          <td style="vertical-align: top;">Normal priority</td>
          <td style="vertical-align: top;">
           <code class="parameter">priority</code> <code class="literal">&lt; 5</code> &amp; 
           <code class="parameter">priority</code> <code class="literal">&gt; -5</code>
          </td>
         </tr>

         <tr>
          <td style="vertical-align: top;">Below normal priority</td>
          <td style="vertical-align: top;">
           <code class="parameter">priority</code> <code class="literal">&gt; 5</code>
          </td>
         </tr>

         <tr>
          <td style="vertical-align: top;">Idle priority</td>
          <td style="vertical-align: top;">
           <code class="parameter">priority</code> <code class="literal">&gt; 9</code>
          </td>
         </tr>

        </tbody>
       
      </table>

     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.proc-nice-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Повертає <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> у разі успіху або <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> в разі помилки.
   If an error occurs, like the user lacks permission to change the priority, 
   an error of level <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> is also generated.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.proc-nice-changelog">
  <h3 class="title">Журнал змін</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Версія</th>
       <th>Опис</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>7.2.0</td>
       <td>
        This function is now available on Windows.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.proc-nice-examples">
  <h3 class="title">Приклади</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Приклад #1 Using <span class="function"><strong>proc_nice()</strong></span> to set the process priority to high</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">// Highest priority<br /></span><span style="color: #0000BB">proc_nice</span><span style="color: #007700">(-</span><span style="color: #0000BB">20</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.proc-nice-notes">
  <h3 class="title">Примітки</h3>
  <blockquote class="note"><p><strong class="note">Зауваження</strong>: 
   <strong>Availability</strong><br />
   <p class="para">
    <span class="function"><strong>proc_nice()</strong></span> will only exist if your system has &#039;nice&#039;
    capabilities. &#039;nice&#039; conforms to: SVr4, SVID EXT, AT&amp;T, X/OPEN, BSD
    4.3.
   </p>
  </p></blockquote>
  <blockquote class="note"><p><strong class="note">Зауваження</strong>: 
   <strong>Windows only</strong><br />
   <p class="para">
    <span class="function"><strong>proc_nice()</strong></span> will change the current <em>process</em>
    priority, even if PHP was compiled using thread safety.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.proc-nice-seealso">
  <h3 class="title">Прогляньте також</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.pcntl-setpriority.php" class="function" rel="rdfs-seeAlso">pcntl_setpriority()</a> - Change the priority of any process</span></li>
  </ul>
 </div>

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