Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54924 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95395 invoked from network); 25 Aug 2011 09:46:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Aug 2011 09:46:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=sebastian@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sebastian@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 93.190.64.36 as permitted sender) X-PHP-List-Original-Sender: sebastian@php.net X-Host-Fingerprint: 93.190.64.36 mail-6.de-punkt.de Received: from [93.190.64.36] ([93.190.64.36:51824] helo=mail-6.de-punkt.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 19/24-06524-2F9165E4 for ; Thu, 25 Aug 2011 05:46:28 -0400 Received: (qmail 10584 invoked by uid 511); 25 Aug 2011 09:46:25 -0000 Received: by simscan 1.3.1 ppid: 10579, pid: 10582, t: 0.0253s scanners: attach: 1.4.0 Received: from unknown (HELO ?0.0.0.0?) (sb%sebastian-bergmann.de@217.114.76.105) by 0 with ESMTPA; 25 Aug 2011 09:46:25 -0000 Message-ID: <4E5619ED.40609@php.net> Date: Thu, 25 Aug 2011 11:46:21 +0200 Organization: PHP Development Team User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: ReflectionClass::newInstanceWithoutConstructor() From: sebastian@php.net (Sebastian Bergmann) I have attached a patch to https://bugs.php.net/bug.php?id=55490 that implements ReflectionClass::newInstanceWithoutConstructor() to create an object a class without invoking the constructor. As there are certain internal classes that would "crash" when their constructor is not invoked, this new method of the Reflection API only works for userland-defined classes. Unless there are objections, I will commit this change to PHP_5_4 and trunk on Monday. I will add the method to the documentation as well, of course. -- Sebastian Bergmann Co-Founder and Principal Consultant http://sebastian-bergmann.de/ http://thePHP.cc/