<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.reflectionnamedtype.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'reflectionnamedtype.isbuiltin.php',
    1 => 'ReflectionNamedType::isBuiltin',
    2 => 'Checks if it is a built-in type',
  ),
  'up' => 
  array (
    0 => 'class.reflectionnamedtype.php',
    1 => 'ReflectionNamedType',
  ),
  'prev' => 
  array (
    0 => 'reflectionnamedtype.getname.php',
    1 => 'ReflectionNamedType::getName',
  ),
  'next' => 
  array (
    0 => 'class.reflectionobject.php',
    1 => 'ReflectionObject',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/reflection/reflectionnamedtype/isbuiltin.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflectionnamedtype.isbuiltin" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ReflectionNamedType::isBuiltin</h1>
  <p class="verinfo">(PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ReflectionNamedType::isBuiltin</span> &mdash; <span class="dc-title">Checks if it is a built-in type</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionnamedtype.isbuiltin-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ReflectionNamedType::isBuiltin</strong></span>(): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Checks if the type is a built-in type in PHP. A built-in type is any type that
   is not a class, interface, or trait.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionnamedtype.isbuiltin-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">Diese Funktion besitzt keine Parameter.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-reflectionnamedtype.isbuiltin-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if it&#039;s a built-in type, otherwise <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-reflectionnamedtype.isbuiltin-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 <span class="methodname"><strong>ReflectionNamedType::isBuiltin()</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">SomeClass </span><span style="color: #007700">{}<br /><br />function </span><span style="color: #0000BB">someFunction</span><span style="color: #007700">(</span><span style="color: #0000BB">string $param</span><span style="color: #007700">, </span><span style="color: #0000BB">SomeClass $param2</span><span style="color: #007700">, </span><span style="color: #0000BB">stdClass $param3</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">$reflectionParams </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">();<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$reflectionParams</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">]-&gt;</span><span style="color: #0000BB">getType</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">isBuiltin</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$reflectionParams</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">]-&gt;</span><span style="color: #0000BB">getType</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">isBuiltin</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$reflectionParams</span><span style="color: #007700">[</span><span style="color: #0000BB">2</span><span style="color: #007700">]-&gt;</span><span style="color: #0000BB">getType</span><span style="color: #007700">()-&gt;</span><span style="color: #0000BB">isBuiltin</span><span style="color: #007700">());</span></span></code></div>
    </div>

    <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt folgende Ausgabe:</p></div>
    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">bool(true)
bool(false)
bool(false)</pre>
</div>
    </div>
   </div>
  </p>
  <p class="para">
   Note that the <span class="methodname"><strong>ReflectionNamedType::isBuiltin()</strong></span> method
   does not distinguish between internal and custom classes. To make this
   distinction, the <span class="methodname"><a href="reflectionclass.isinternal.php" class="methodname">ReflectionClass::isInternal()</a></span> method
   should be used on the returned class name.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-reflectionnamedtype.isbuiltin-seealso">
  <h3 class="title">Siehe auch</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="reflectiontype.tostring.php" class="methodname" rel="rdfs-seeAlso">ReflectionType::__toString()</a> - To string</span></li>
    <li><span class="methodname"><a href="reflectionclass.isinternal.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::isInternal()</a> - Checks if class is defined internally by an extension, or the core</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); ?>