<?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 => 'it',
  ),
  'this' => 
  array (
    0 => 'reflectionmethod.getprototype.php',
    1 => 'ReflectionMethod::getPrototype',
    2 => 'Gets the method prototype (if there is one)',
  ),
  'up' => 
  array (
    0 => 'class.reflectionmethod.php',
    1 => 'ReflectionMethod',
  ),
  'prev' => 
  array (
    0 => 'reflectionmethod.getmodifiers.php',
    1 => 'ReflectionMethod::getModifiers',
  ),
  'next' => 
  array (
    0 => 'reflectionmethod.hasprototype.php',
    1 => 'ReflectionMethod::hasPrototype',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/reflection/reflectionmethod/getprototype.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflectionmethod.getprototype" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ReflectionMethod::getPrototype</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.1.2, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ReflectionMethod::getPrototype</span> &mdash; <span class="dc-title">Gets the method prototype (if there is one)</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionmethod.getprototype-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ReflectionMethod::getPrototype</strong></span>(): <span class="type"><a href="class.reflectionmethod.php" class="type ReflectionMethod">ReflectionMethod</a></span></div>

  <p class="para rdfs-comment">
   Returns the methods prototype.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionmethod.getprototype-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">Questa funzione non contiene parametri.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-reflectionmethod.getprototype-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   A <span class="classname"><a href="class.reflectionmethod.php" class="classname">ReflectionMethod</a></span> instance of the method prototype.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-reflectionmethod.getprototype-errors">
  <h3 class="title">Errori/Eccezioni</h3>
  <p class="para">
   A <span class="classname"><a href="class.reflectionexception.php" class="classname">ReflectionException</a></span> exception is thrown if
   the method does not have a prototype.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-reflectionmethod.getprototype-examples">
  <h3 class="title">Esempi</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Example #1 <span class="methodname"><strong>ReflectionMethod::getPrototype()</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 /></span><span style="color: #007700">class </span><span style="color: #0000BB">Hello </span><span style="color: #007700">{<br /><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 />        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 </span><span style="color: #007700">{<br /><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 />        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 />}<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">getPrototype</span><span style="color: #007700">());<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="annotation-interactive examplescode"><pre class="examplescode">object(ReflectionMethod)#2 (2) {
  [&quot;name&quot;]=&gt;
  string(10) &quot;sayHelloTo&quot;
  [&quot;class&quot;]=&gt;
  string(5) &quot;Hello&quot;
}</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-reflectionmethod.getprototype-seealso">
  <h3 class="title">Vedere anche:</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="reflectionmethod.getmodifiers.php" class="methodname" rel="rdfs-seeAlso">ReflectionMethod::getModifiers()</a> - Gets the method modifiers</span></li>
    <li><span class="methodname"><a href="reflectionmethod.hasprototype.php" class="methodname" rel="rdfs-seeAlso">ReflectionMethod::hasPrototype()</a> - Returns whether a method has a prototype</span></li>
   </ul>
  </p>
 </div>


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