<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.reflectionclass.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'reflectionclass.issubclassof.php',
    1 => 'ReflectionClass::isSubclassOf',
    2 => '检查是否为子类',
  ),
  'up' => 
  array (
    0 => 'class.reflectionclass.php',
    1 => 'ReflectionClass',
  ),
  'prev' => 
  array (
    0 => 'reflectionclass.isreadonly.php',
    1 => 'ReflectionClass::isReadOnly',
  ),
  'next' => 
  array (
    0 => 'reflectionclass.istrait.php',
    1 => 'ReflectionClass::isTrait',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    'path' => 'reference/reflection/reflectionclass/issubclassof.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflectionclass.issubclassof" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ReflectionClass::isSubclassOf</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ReflectionClass::isSubclassOf</span> &mdash; <span class="dc-title">检查是否为子类</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionclass.issubclassof-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ReflectionClass::isSubclassOf</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="class.reflectionclass.php" class="type ReflectionClass">ReflectionClass</a></span>|<span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$class</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   检查类是否为指定类的子类，或者实现了指定的接口。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionclass.issubclassof-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">class</code></dt>
     <dd>
      <p class="para">
       要检查的 <span class="type"><a href="language.types.string.php" class="type string">string</a></span> 形式的类名或者类的 <span class="type"><a href="class.reflectionclass.php" class="type ReflectionClass">ReflectionClass</a></span> 对象。
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-reflectionclass.issubclassof-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   如果类是指定类或接口的子类，则返回 <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>，否则返回 <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>。
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-reflectionclass.issubclassof-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="reflectionclass.isinterface.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::isInterface()</a> - 检查类是否是接口（interface）</span></li>
    <li><span class="methodname"><a href="reflectionclass.implementsinterface.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::implementsInterface()</a> - 实现接口</span></li>
    <li><span class="function"><a href="function.is-subclass-of.php" class="function" rel="rdfs-seeAlso">is_subclass_of()</a> - 检查对象是否继承或者实现（implement）此类</span></li>
    <li><span class="function"><a href="function.get-parent-class.php" class="function" rel="rdfs-seeAlso">get_parent_class()</a> - 检索对象或者类的父级类名</span></li>
   </ul>
  </p>
 </div>


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