ReflectionClass::newInstanceWithoutConstructor

(PHP >= 5.4.0)
Creates a new class instance without invoking the constructor.
public object ReflectionClass::newInstanceWithoutConstructor ( void )

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

Returns:
Exception:

A ReflectionException if the class is an internal class that cannot be instantiated without invoking the constructor. In PHP 5.6.0 onwards, this exception is limited only to internal classes that are final.

Changelog:
5.6.0

All internal classes can now be instantiated except for those declared final.

See also:

ReflectionClass::newInstance() -

ReflectionClass::newInstanceArgs() -

doc_php
2016-02-24 16:13:26
Comments
Leave a Comment

Please login to continue.