<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.taint.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.taint.php',
    1 => 'taint',
    2 => 'Mark strings as tainted',
  ),
  'up' => 
  array (
    0 => 'ref.taint.php',
    1 => 'Taint Функції',
  ),
  'prev' => 
  array (
    0 => 'function.is-tainted.php',
    1 => 'is_tainted',
  ),
  'next' => 
  array (
    0 => 'function.untaint.php',
    1 => 'untaint',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/taint/functions/taint.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.taint" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">taint</h1>
  <p class="verinfo">(PECL taint &gt;=0.1.0)</p><p class="refpurpose"><span class="refname">taint</span> &mdash; <span class="dc-title">Mark strings as tainted</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.taint-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">function</span> <span class="methodname"><strong>taint</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter reference">&$string</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter reference">&...$strings</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="simpara">
   Manually marks the given strings as tainted, as if they had arrived
   from user input. The variables are passed by reference, but the mark
   itself is stored on the string rather than on the variable: every
   variable sharing the same string becomes tainted at once.
  </p>
  <p class="simpara">
   This is mainly useful for testing, and for simulating user input in
   CLI scripts where the <a href="reserved.variables.get.php" class="link">$_GET</a>,
   <a href="reserved.variables.post.php" class="link">$_POST</a> and
   <a href="reserved.variables.cookies.php" class="link">$_COOKIE</a>
   superglobals are not populated.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.taint-parameters">
  <h3 class="title">Параметри</h3>
  <dl>
   
    <dt><code class="parameter">string</code></dt>
    <dd>
     <p class="simpara">
      A variable holding the string to mark.
     </p>
    </dd>
   
   
    <dt><code class="parameter">strings</code></dt>
    <dd>
     <p class="simpara">
      Further variables to mark.
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.taint-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="simpara">
   Always returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>. When
   <a href="taint.configuration.php#ini.taint.enable" class="link">taint.enable</a> is off, the
   function does nothing and still returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.taint-examples">
  <h3 class="title">Приклади</h3>
  <div class="example" id="example-1">
   <p><strong>Приклад #1 <span class="function"><strong>taint()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><pre><code style="color: #000000"><span style="color: #0000BB">&lt;?php
$name </span><span style="color: #007700">= </span><span style="color: #DD0000">"world"</span><span style="color: #007700">;
</span><span style="color: #0000BB">taint</span><span style="color: #007700">(</span><span style="color: #0000BB">$name</span><span style="color: #007700">);
</span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">is_tainted</span><span style="color: #007700">(</span><span style="color: #0000BB">$name</span><span style="color: #007700">));
</span><span style="color: #0000BB">?&gt;</span></code></pre></div>
   </div>

   <div class="example-contents"><p>Поданий вище приклад виведе щось
схоже на:</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">bool(true)</pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 notes" id="refsect1-function.taint-notes">
  <h3 class="title">Примітки</h3>
  <blockquote class="note"><p><strong class="note">Зауваження</strong>: 
   <p class="simpara">
    Only non-empty strings are marked; variables holding other types, or
    empty strings, are silently ignored.
   </p>
  </p></blockquote>
  <blockquote class="note"><p><strong class="note">Зауваження</strong>: 
   <p class="simpara">
    Interned, persistent and permanent strings (string literals, opcache
    shared strings) can never carry the mark and are silently skipped.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.taint-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.untaint.php" class="function" rel="rdfs-seeAlso">untaint()</a> - Remove the taint mark from strings</span></li>
    <li><span class="function"><a href="function.is-tainted.php" class="function" rel="rdfs-seeAlso">is_tainted()</a> - Check whether a string is tainted</span></li>
   </ul>
  </p>
 </div>


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