<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.ctype.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.ctype-cntrl.php',
    1 => 'ctype_cntrl',
    2 => 'Controlla i caratteri di controllo',
  ),
  'up' => 
  array (
    0 => 'ref.ctype.php',
    1 => 'Funzioni Ctype',
  ),
  'prev' => 
  array (
    0 => 'function.ctype-alpha.php',
    1 => 'ctype_alpha',
  ),
  'next' => 
  array (
    0 => 'function.ctype-digit.php',
    1 => 'ctype_digit',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'it',
    'path' => 'reference/ctype/functions/ctype-cntrl.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.ctype-cntrl" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ctype_cntrl</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ctype_cntrl</span> &mdash; <span class="dc-title">Controlla i caratteri di controllo</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.ctype-cntrl-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>ctype_cntrl</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">$text</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Controlla che tutti i caratteri nella <span class="type"><a href="language.types.string.php" class="type string">string</a></span>,
   <code class="parameter">text</code>, siano caratteri di controllo.
   I caratteri di controllo sono ad esempio a capo, tab, escape.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.ctype-cntrl-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">text</code></dt>
     <dd>
      <p class="para">
       La stringa da testare.
       <blockquote class="note"><p><strong class="note">Nota</strong>: <p class="para">
Se è fornito un <span class="type"><a href="language.types.integer.php" class="type integer">integer</a></span> tra -128 e 255, viene interpretato come
il valore ASCII di un singolo carattere (ai valori negativi viene aggiunto 256 in modo da
permettere i caratteri Extended ASCII). Qualsiasi altro intero è interpretato come una stringa
contenente le cifre decimali dell&#039;intero.</p></p></blockquote>
       <div class="warning"><strong class="warning">Avviso</strong><p class="para">
As of PHP 8.1.0, passing a non-string argument is deprecated.
In the future, the argument will be interpreted as a string instead of an ASCII codepoint.
Depending on the intended behavior, the argument should either be cast to <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
or an explicit call to <span class="function"><a href="function.chr.php" class="function">chr()</a></span> should be made.</p></div>
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.ctype-cntrl-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   Restituisce <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> se ogni carattere in <code class="parameter">text</code> è 
   un carattere di controllo dal locale corrente, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> in caso contrario.
   When called with an empty string the result will always be <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.ctype-cntrl-examples">
  <h3 class="title">Esempi</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Example #1 Un esempio di <span class="function"><strong>ctype_cntrl()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$strings </span><span style="color: #007700">= array(</span><span style="color: #DD0000">'string1' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">"\n\r\t"</span><span style="color: #007700">, </span><span style="color: #DD0000">'string2' </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">'arf12'</span><span style="color: #007700">);<br />foreach (</span><span style="color: #0000BB">$strings </span><span style="color: #007700">as </span><span style="color: #0000BB">$name </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">$testcase</span><span style="color: #007700">) {<br />    if (</span><span style="color: #0000BB">ctype_cntrl</span><span style="color: #007700">(</span><span style="color: #0000BB">$testcase</span><span style="color: #007700">)) {<br />        echo </span><span style="color: #DD0000">"The string '</span><span style="color: #0000BB">$name</span><span style="color: #DD0000">' consists of all control characters.\n"</span><span style="color: #007700">;<br />    } else {<br />        echo </span><span style="color: #DD0000">"The string '</span><span style="color: #0000BB">$name</span><span style="color: #DD0000">' does not consist of all control characters.\n"</span><span style="color: #007700">;<br />    }<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Il precedente esempio visualizzerà:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">The string &#039;string1&#039; consists of all control characters.
The string &#039;string2&#039; does not consist of all control characters.</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.ctype-cntrl-seealso">
  <h3 class="title">Vedere anche:</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.ctype-print.php" class="function" rel="rdfs-seeAlso">ctype_print()</a> - Controlla i caratteri stampabili</span></li>
    <li><span class="function"><a href="intlchar.iscntrl.php" class="function" rel="rdfs-seeAlso">IntlChar::iscntrl()</a> - Check if code point is a control character</span></li>
   </ul>
  </p>
 </div>

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