Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54941 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36129 invoked from network); 25 Aug 2011 12:55:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Aug 2011 12:55:00 -0000 Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 193.136.128.21 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.21 smtp1.ist.utl.pt Linux 2.6 Received: from [193.136.128.21] ([193.136.128.21:47412] helo=smtp1.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C5/B6-00227-126465E4 for ; Thu, 25 Aug 2011 08:54:58 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1.ist.utl.pt (Postfix) with ESMTP id 47F75700043C for ; Thu, 25 Aug 2011 13:54:53 +0100 (WEST) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp1.ist.utl.pt ([127.0.0.1]) by localhost (smtp1.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id a5tlzV1xcyNj for ; Thu, 25 Aug 2011 13:54:53 +0100 (WEST) Received: from mail2.ist.utl.pt (mail.ist.utl.pt [IPv6:2001:690:2100:1::8]) by smtp1.ist.utl.pt (Postfix) with ESMTP id 1511C7000427 for ; Thu, 25 Aug 2011 13:54:53 +0100 (WEST) Received: from cataphract-old.dulce.lo.geleia.net (cataphract-old.dulce.lo.geleia.net [IPv6:2001:470:94a2:2:9978:6e7:759:40ee]) (Authenticated sender: ist155741) by mail2.ist.utl.pt (Postfix) with ESMTPSA id 734BE200829E for ; Thu, 25 Aug 2011 13:54:51 +0100 (WEST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: internals@lists.php.net References: <4E5619ED.40609@php.net> <4E5642F7.9060702@php.net> Date: Thu, 25 Aug 2011 13:54:38 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Organization: =?utf-8?Q?N=C3=BAcleo_de_Eng=2E_Biom=C3=A9di?= =?utf-8?Q?ca_do_IST?= Message-ID: In-Reply-To: <4E5642F7.9060702@php.net> User-Agent: Opera Mail/11.50 (Win32) Subject: Re: [PHP-DEV] ReflectionClass::newInstanceWithoutConstructor() From: glopes@nebm.ist.utl.pt ("Gustavo Lopes") On Thu, 25 Aug 2011 13:41:27 +0100, Sebastian Bergmann wrote: > On 08/25/2011 01:46 PM, Gustavo Lopes wrote: >> What about userland classes that extend internal classes? > > Good point. How would I implement such a check? > You could fetch the parent and do the same check, and so on. I think you might be able to just check whether ce.create_object is not NULL, because if the internal class doesn't replace create_object, there's no chance of that class of crashes occurring; plus, they're propagated to the subclasses. -- Gustavo Lopes