ReflectionClass::newInstanceWithoutConstructor

ReflectionClass::newInstanceWithoutConstructor

(PHP >= 5.4.0)

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

Description

public object ReflectionClass::newInstanceWithoutConstructor ( void )

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

Parameters

Return Values

Changelog

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

Errors/Exceptions

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.

See Also

© 1997–2017 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://secure.php.net/manual/en/reflectionclass.newinstancewithoutconstructor.php

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部