<?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 => 'zh',
  ),
  'this' => 
  array (
    0 => 'language.types.relative-class-types.php',
    1 => '相对类类型',
    2 => '相对类类型',
  ),
  'up' => 
  array (
    0 => 'language.types.php',
    1 => '类型',
  ),
  'prev' => 
  array (
    0 => 'language.types.never.php',
    1 => 'Never',
  ),
  'next' => 
  array (
    0 => 'language.types.singleton.php',
    1 => '单例类型',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    '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">相对类类型</h2>

 <p class="para">
  这些类型声明只能在类中使用。
 </p>

 <div class="sect2" id="language.types.relative-class-types.self">
  <h3 class="title"><span class="type">self</span></h3>
  <p class="para">
   该值必须是与类型声明所在类相同的类的 <a href="language.operators.type.php" class="link"><code class="literal">instanceof</code></a> 实例。
  </p>
 </div>

 <div class="sect2" id="language.types.relative-class-types.parent">
  <h3 class="title"><span class="type">parent</span></h3>
  <p class="para">
   值必须是 <a href="language.operators.type.php" class="link"><code class="literal">instanceof</code></a> 使用了类型声明的父级类。
  </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> 是仅用于返回值的类型，要求返回的值必须是调用该方法的类的
   <a href="language.operators.type.php" class="link"><code class="literal">instanceof</code></a> 实例。自 PHP 8.0.0 起可用。
  </p>
 </div>

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