ReflectionClass::newInstanceWithoutConstructor

(PHP 5 >= 5.4.0, PHP 7, PHP 8)

ReflectionClass::newInstanceWithoutConstructor创建新的类实例而不调用它的构造函数

说明

public ReflectionClass::newInstanceWithoutConstructor(): object

创建一个新的类的实例而不调用它的构造函数。

参数

返回值

错误/异常

如果这个类是必须调用构造函数来实例化的内置类,将导致 ReflectionException。此异常仅限于 final 的内置类。

参见

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top