downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

ReflectionClass::newInstanceArgs> <ReflectionClass::isUserDefined
[edit] Last updated: Sat, 18 May 2013

view this page in

ReflectionClass::newInstance

(PHP 5)

ReflectionClass::newInstance从指定的参数创建一个新的类实例

说明

public object ReflectionClass::newInstance ( mixed $args [, mixed $... ] )

创建类的新的实例。给出的参数将会传递到类的构造函数。

参数

args

接受可变数目的参数,用于传递到类的构造函数,和 call_user_func() 很相似。

返回值

错误/异常

如果类的构造函数不是 public 的将会导致一个 ReflectionException

args 指定了一个或多个参数,而类不具有构造函数时,将导致一个 ReflectionException

参见



add a note add a note User Contributed Notes ReflectionClass::newInstance - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites