<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.dom-parentnode.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'dom-parentnode.prepend.php',
    1 => 'Dom\\ParentNode::prepend',
    2 => 'Prepends nodes before the first child node',
  ),
  'up' => 
  array (
    0 => 'class.dom-parentnode.php',
    1 => 'Dom\\ParentNode',
  ),
  'prev' => 
  array (
    0 => 'dom-parentnode.append.php',
    1 => 'Dom\\ParentNode::append',
  ),
  'next' => 
  array (
    0 => 'dom-parentnode.queryselector.php',
    1 => 'Dom\\ParentNode::querySelector',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/dom/dom/parentnode/prepend.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="dom-parentnode.prepend" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Dom\ParentNode::prepend</h1>
  <p class="verinfo">(PHP 8 &gt;= 8.4.0)</p><p class="refpurpose"><span class="refname">Dom\ParentNode::prepend</span> &mdash; <span class="dc-title">Prepends nodes before the first child node</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-dom-parentnode.prepend-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Dom\ParentNode::prepend</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="class.dom-node.php" class="type Dom\Node">Dom\Node</a></span>|<span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">...$nodes</code></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

  <p class="para rdfs-comment">
   Prepends one or many <code class="parameter">nodes</code> to the list of children before the first child node.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-dom-parentnode.prepend-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">nodes</code></dt>
     <dd>
      <p class="para">
       The nodes to prepend.
       Strings are automatically converted to text nodes.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-dom-parentnode.prepend-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   没有返回值。
  </p>
 </div>

 <div class="refsect1 errors" id="refsect1-dom-parentnode.prepend-errors">
  <h3 class="title">错误／异常</h3>
  <dl>
   
 <dt><strong><code><a href="dom.constants.php#constant.dom-hierarchy-request-err">DOM_HIERARCHY_REQUEST_ERR</a></code></strong></dt>
  <dd>
  <p class="para">
    Raised if this node is of a type that does not allow children of the
    type of one of the passed <code class="parameter">nodes</code>, or if the node to
    put in is one of this node&#039;s ancestors or this node itself.
  </p>
 </dd>

   
 <dt><strong><code><a href="dom.constants.php#constant.dom-wrong-document-err">DOM_WRONG_DOCUMENT_ERR</a></code></strong></dt>
  <dd>
  <p class="para">
    Raised if one of the passed <code class="parameter">nodes</code> was created from a different
    document than the one that created this node.
  </p>
 </dd>

  </dl>
 </div>


 <div class="refsect1 seealso" id="refsect1-dom-parentnode.prepend-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="dom-parentnode.append.php" class="methodname" rel="rdfs-seeAlso">Dom\ParentNode::append()</a> - Appends nodes after the last child node</span></li>
  </ul>
 </div>


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