<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.reflectionintersectiontype.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'reflectionintersectiontype.gettypes.php',
    1 => 'ReflectionIntersectionType::getTypes',
    2 => 'Returns the types included in the intersection type',
  ),
  'up' => 
  array (
    0 => 'class.reflectionintersectiontype.php',
    1 => 'ReflectionIntersectionType',
  ),
  'prev' => 
  array (
    0 => 'class.reflectionintersectiontype.php',
    1 => 'ReflectionIntersectionType',
  ),
  'next' => 
  array (
    0 => 'class.reflectionreference.php',
    1 => 'ReflectionReference',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/reflection/reflectionintersectiontype/gettypes.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflectionintersectiontype.gettypes" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ReflectionIntersectionType::getTypes</h1>
  <p class="verinfo">(PHP 8 &gt;= 8.1.0)</p><p class="refpurpose"><span class="refname">ReflectionIntersectionType::getTypes</span> &mdash; <span class="dc-title">Returns the types included in the intersection type</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionintersectiontype.gettypes-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ReflectionIntersectionType::getTypes</strong></span>(): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>

  <p class="para rdfs-comment">
   Returns the reflections of types included in the intersection type.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionintersectiontype.gettypes-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">У цієї функції немає
параметрів.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-reflectionintersectiontype.gettypes-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   An array of <span class="classname"><a href="class.reflectiontype.php" class="classname">ReflectionType</a></span> objects.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-reflectionintersectiontype.gettypes-examples">
  <h3 class="title">Приклади</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Приклад #1 <span class="methodname"><strong>ReflectionIntersectionType::getTypes()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #007700">function </span><span style="color: #0000BB">someFunction</span><span style="color: #007700">(</span><span style="color: #0000BB">Iterator</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">Countable $value</span><span style="color: #007700">) {}<br /><br /></span><span style="color: #0000BB">$reflectionFunc </span><span style="color: #007700">= new </span><span style="color: #0000BB">ReflectionFunction</span><span style="color: #007700">(</span><span style="color: #DD0000">'someFunction'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$reflectionParam </span><span style="color: #007700">= </span><span style="color: #0000BB">$reflectionFunc</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getParameters</span><span style="color: #007700">()[</span><span style="color: #0000BB">0</span><span style="color: #007700">];<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$reflectionParam</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getType</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">getTypes</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Поданий вище приклад виведе щось
схоже на:</p></div>
    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">array(2) {
    [0] =&gt;
    class ReflectionNamedType#4(0) {
    }
    [1] =&gt;
    class ReflectionNamedType#5(0) {
    }
}</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-reflectionintersectiontype.gettypes-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="reflectiontype.allowsnull.php" class="methodname" rel="rdfs-seeAlso">ReflectionType::allowsNull()</a> - Checks if null is allowed</span></li>
    <li><span class="methodname"><a href="reflectionparameter.gettype.php" class="methodname" rel="rdfs-seeAlso">ReflectionParameter::getType()</a> - Gets a parameter's type</span></li>
   </ul>
  </p>
 </div>


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