<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.reflectionfunctionabstract.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'pt_BR',
  ),
  'this' => 
  array (
    0 => 'reflectionfunctionabstract.isclosure.php',
    1 => 'ReflectionFunctionAbstract::isClosure',
    2 => 'Verifica se &eacute; um closure',
  ),
  'up' => 
  array (
    0 => 'class.reflectionfunctionabstract.php',
    1 => 'ReflectionFunctionAbstract',
  ),
  'prev' => 
  array (
    0 => 'reflectionfunctionabstract.innamespace.php',
    1 => 'ReflectionFunctionAbstract::inNamespace',
  ),
  'next' => 
  array (
    0 => 'reflectionfunctionabstract.isdeprecated.php',
    1 => 'ReflectionFunctionAbstract::isDeprecated',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'pt_BR',
    'path' => 'reference/reflection/reflectionfunctionabstract/isclosure.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflectionfunctionabstract.isclosure" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ReflectionFunctionAbstract::isClosure</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ReflectionFunctionAbstract::isClosure</span> &mdash; <span class="dc-title">Verifica se é um closure</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionfunctionabstract.isclosure-description">
  <h3 class="title">Descrição</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ReflectionFunctionAbstract::isClosure</strong></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Verifica se a função refletida é um <span class="classname"><a href="class.closure.php" class="classname">Closure</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionfunctionabstract.isclosure-parameters">
  <h3 class="title">Parâmetros</h3>
  <p class="para">Esta função não possui parâmetros.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-reflectionfunctionabstract.isclosure-returnvalues">
  <h3 class="title">Valor Retornado</h3>
  <p class="para">
   Retorna <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> se a função for um <span class="classname"><a href="class.closure.php" class="classname">Closure</a></span>, caso contrário, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
  </p>
 </div>


<div class="refsect1 examples" id="refsect1-reflectionfunctionabstract.isclosure-examples">
  <h3 class="title">Exemplos</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Exemplo #1 Exemplo de <span class="methodname"><strong>ReflectionFunctionAbstract::isClosure()</strong></span></strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">// Não Closure<br /></span><span style="color: #0000BB">$function1 </span><span style="color: #007700">= </span><span style="color: #DD0000">'str_replace'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$reflection1 </span><span style="color: #007700">= new </span><span style="color: #0000BB">ReflectionFunction</span><span style="color: #007700">(</span><span style="color: #0000BB">$function1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$reflection1</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">isClosure</span><span style="color: #007700">());<br /><br /></span><span style="color: #FF8000">// Closure<br /></span><span style="color: #0000BB">$function2 </span><span style="color: #007700">= function () {};<br /></span><span style="color: #0000BB">$reflection2 </span><span style="color: #007700">= new </span><span style="color: #0000BB">ReflectionFunction</span><span style="color: #007700">(</span><span style="color: #0000BB">$function2</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$reflection2</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">isClosure</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>O exemplo acima produzirá:</p></div>
    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">bool(false)
bool(true)</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-reflectionfunctionabstract.isclosure-seealso">
  <h3 class="title">Veja Também</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="reflectionfunctionabstract.isgenerator.php" class="methodname" rel="rdfs-seeAlso">ReflectionFunctionAbstract::isGenerator()</a> - Retorna se esta fun&ccedil;&atilde;o &eacute; um gerador</span></li>
   </ul>
  </p>
 </div>


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