<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/language.types.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'language.types.relative-class-types.php',
    1 => 'Relative class types',
    2 => 'Relative class types',
  ),
  'up' => 
  array (
    0 => 'language.types.php',
    1 => 'Tipi di dati',
  ),
  'prev' => 
  array (
    0 => 'language.types.never.php',
    1 => 'Never',
  ),
  'next' => 
  array (
    0 => 'language.types.singleton.php',
    1 => 'Singleton types',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'language/types/relative-class-types.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="language.types.relative-class-types" class="sect1">
 <h2 class="title">Relative class types</h2>

 <p class="para">
  These types declarations can only be used within classes.
 </p>

 <div class="sect2" id="language.types.relative-class-types.self">
  <h3 class="title"><span class="type">self</span></h3>
  <p class="para">
   The value must be an <a href="language.operators.type.php" class="link"><code class="literal">instanceof</code></a> the same class as the one
   in which the type declaration is used.
  </p>
 </div>

 <div class="sect2" id="language.types.relative-class-types.parent">
  <h3 class="title"><span class="type">parent</span></h3>
  <p class="para">
   The value must be an <a href="language.operators.type.php" class="link"><code class="literal">instanceof</code></a> a parent of the class
   in which the type declaration is used.
  </p>
 </div>

 <div class="sect2" id="language.types.relative-class-types.static">
  <h3 class="title">static</h3>
  <p class="para">
   <span class="type">static</span> is a return-only type which requires that the
   value returned must be an <a href="language.operators.type.php" class="link"><code class="literal">instanceof</code></a> the same class as the one
   the method is called in.
   Available as of PHP 8.0.0.
  </p>
 </div>

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