<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.reflectionmethod.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'reflectionmethod.hasprototype.php',
    1 => 'ReflectionMethod::hasPrototype',
    2 => 'Returns whether a method has a prototype',
  ),
  'up' => 
  array (
    0 => 'class.reflectionmethod.php',
    1 => 'ReflectionMethod',
  ),
  'prev' => 
  array (
    0 => 'reflectionmethod.getprototype.php',
    1 => 'ReflectionMethod::getPrototype',
  ),
  'next' => 
  array (
    0 => 'reflectionmethod.invoke.php',
    1 => 'ReflectionMethod::invoke',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/reflection/reflectionmethod/hasprototype.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflectionmethod.hasprototype" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ReflectionMethod::hasPrototype</h1>
  <p class="verinfo">(PHP 8 &gt;= 8.2.0)</p><p class="refpurpose"><span class="refname">ReflectionMethod::hasPrototype</span> &mdash; <span class="dc-title">Returns whether a method has a prototype</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionmethod.hasprototype-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ReflectionMethod::hasPrototype</strong></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Returns whether a method has a prototype.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionmethod.hasprototype-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">This function has no parameters.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-reflectionmethod.hasprototype-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if the method has a prototype, otherwise <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-reflectionmethod.hasprototype-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Example #1 <span class="methodname"><strong>ReflectionMethod::hasPrototype()</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">class </span><span style="color: #0000BB">Hello<br /></span><span style="color: #007700">{<br />    public function </span><span style="color: #0000BB">sayHelloTo</span><span style="color: #007700">(</span><span style="color: #0000BB">$name</span><span style="color: #007700">)<br />    {<br />        return </span><span style="color: #DD0000">'Hello '</span><span style="color: #007700">.</span><span style="color: #0000BB">$name</span><span style="color: #007700">;<br />    }<br />}<br /><br />class </span><span style="color: #0000BB">HelloWorld </span><span style="color: #007700">extends </span><span style="color: #0000BB">Hello<br /></span><span style="color: #007700">{<br />    public function </span><span style="color: #0000BB">sayHelloTo</span><span style="color: #007700">(</span><span style="color: #0000BB">$name</span><span style="color: #007700">)<br />    {<br />        return </span><span style="color: #DD0000">'Hello world: '</span><span style="color: #007700">.</span><span style="color: #0000BB">$name</span><span style="color: #007700">;<br />    }<br />}<br /></span><span style="color: #0000BB">$reflectionMethod </span><span style="color: #007700">= new </span><span style="color: #0000BB">ReflectionMethod</span><span style="color: #007700">(</span><span style="color: #DD0000">'HelloWorld'</span><span style="color: #007700">, </span><span style="color: #DD0000">'sayHelloTo'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$reflectionMethod</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">hasPrototype</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>The above example will output:</p></div>
    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">bool(true)</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-reflectionmethod.hasprototype-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="reflectionmethod.getprototype.php" class="methodname" rel="rdfs-seeAlso">ReflectionMethod::getPrototype()</a> - Gets the method prototype (if there is one)</span></li>
   </ul>
  </p>
 </div>


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