<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.uopz.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.uopz-implement.php',
    1 => 'uopz_implement',
    2 => 'Implements an interface at runtime',
  ),
  'up' => 
  array (
    0 => 'ref.uopz.php',
    1 => 'Uopz Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.uopz-get-static.php',
    1 => 'uopz_get_static',
  ),
  'next' => 
  array (
    0 => 'function.uopz-overload.php',
    1 => 'uopz_overload',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/uopz/functions/uopz-implement.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.uopz-implement" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">uopz_implement</h1>
  <p class="verinfo">(PECL uopz 1, PECL uopz 2, PECL uopz 5, PECL uopz 6, PECL uopz 7 &lt; 7.1.0)</p><p class="refpurpose"><span class="refname">uopz_implement</span> &mdash; <span class="dc-title">Implements an interface at runtime</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.uopz-implement-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>uopz_implement</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$class</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$interface</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Makes <code class="parameter">class</code> implement <code class="parameter">interface</code>
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-function.uopz-implement-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <dl>
   
    <dt><code class="parameter">class</code></dt>
    <dd>
     <p class="para">

     </p>
    </dd>
   
   
    <dt><code class="parameter">interface</code></dt>
    <dd>
     <p class="para">
      
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.uopz-implement-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   Restituisce <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> in caso di successo, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> in caso di fallimento.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.uopz-implement-errors">
  <h3 class="title">Errori/Eccezioni</h3>
  <p class="simpara">
   As of PHP 7.4.0, <span class="function"><strong>uopz_implements()</strong></span> throws a <span class="classname"><a href="class.runtimeexception.php" class="classname">RuntimeException</a></span>,
   if <a href="book.opcache.php" class="link">OPcache</a> is enabled,
   and the class entry of <code class="parameter">class</code> is immutable.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.uopz-implement-examples">
  <h3 class="title">Esempi</h3>
  <div class="example" id="example-1">
   <p><strong>Example #1 <span class="function"><strong>uopz_implement()</strong></span> example</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: #007700">interface </span><span style="color: #0000BB">myInterface </span><span style="color: #007700">{}<br /><br />class </span><span style="color: #0000BB">myClass </span><span style="color: #007700">{}<br /><br /></span><span style="color: #0000BB">uopz_implement</span><span style="color: #007700">(</span><span style="color: #0000BB">myClass</span><span style="color: #007700">::class, </span><span style="color: #0000BB">myInterface</span><span style="color: #007700">::class);<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">class_implements</span><span style="color: #007700">(</span><span style="color: #0000BB">myClass</span><span style="color: #007700">::class));<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">array(1) {
  [&quot;myInterface&quot;]=&gt;
  string(11) &quot;myInterface&quot;
}</pre>
</div>
   </div>
  </div>
 </div>



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