ReflectionClass::newInstanceWithoutConstructor
PHP Manual
PHP Manual»ReflectionClass»ReflectionClass::newInstanceWithoutConstructor

ReflectionClass::newInstanceWithoutConstructor

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

ReflectionClass::newInstanceWithoutConstructorCreates a new class instance without invoking the constructor

Опис

public function ReflectionClass::newInstanceWithoutConstructor(): object

Creates a new instance of the class without invoking the constructor.

Параметри

Значення, що повертаються

Помилки/виключення

A ReflectionException if the class is an internal class that cannot be instantiated without invoking the constructor. This exception is limited only to internal classes that are final.

Прогляньте також

To Top