<?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 => 'de',
  ),
  'this' => 
  array (
    0 => 'reflectionclass.newinstance.php',
    1 => 'ReflectionClass::newInstance',
    2 => 'Creates a new class instance from given arguments',
  ),
  'up' => 
  array (
    0 => 'class.reflectionclass.php',
    1 => 'ReflectionClass',
  ),
  'prev' => 
  array (
    0 => 'reflectionclass.marklazyobjectasinitialized.php',
    1 => 'ReflectionClass::markLazyObjectAsInitialized',
  ),
  'next' => 
  array (
    0 => 'reflectionclass.newinstanceargs.php',
    1 => 'ReflectionClass::newInstanceArgs',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/reflection/reflectionclass/newinstance.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="reflectionclass.newinstance" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ReflectionClass::newInstance</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ReflectionClass::newInstance</span> &mdash; <span class="dc-title">Creates a new class instance from given arguments</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-reflectionclass.newinstance-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>ReflectionClass::newInstance</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.mixed.php" class="type mixed">mixed</a></span> <code class="parameter">...$args</code></span>): <span class="type"><a href="language.types.object.php" class="type object">object</a></span></div>

  <p class="para rdfs-comment">
   Creates a new instance of the class. The given arguments are passed to the
   class constructor.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-reflectionclass.newinstance-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">args</code></dt>
     <dd>
      <p class="para">
       Accepts a variable number of arguments which are passed to the class
       constructor, much like <span class="function"><a href="function.call-user-func.php" class="function">call_user_func()</a></span>.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-reflectionclass.newinstance-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">

  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-reflectionclass.newinstance-errors">
  <h3 class="title">Fehler/Exceptions</h3>
  <p class="para">
   A <span class="classname"><a href="class.reflectionexception.php" class="classname">ReflectionException</a></span> if the class constructor is not public.
  </p>
  <p class="para">
   A <span class="classname"><a href="class.reflectionexception.php" class="classname">ReflectionException</a></span> if the class does not have a constructor
   and the <code class="parameter">args</code> parameter contains one or more parameters.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-reflectionclass.newinstance-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="reflectionclass.newinstanceargs.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::newInstanceArgs()</a> - Creates a new class instance from given arguments</span></li>
    <li><span class="methodname"><a href="reflectionclass.newinstancewithoutconstructor.php" class="methodname" rel="rdfs-seeAlso">ReflectionClass::newInstanceWithoutConstructor()</a> - Creates a new class instance without invoking the constructor</span></li>
   </ul>
  </p>
 </div>


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