Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:23220 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29853 invoked by uid 1010); 9 May 2006 21:55:55 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 29836 invoked from network); 9 May 2006 21:55:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 May 2006 21:55:55 -0000 X-PHP-List-Original-Sender: tm@ippfp.org X-Host-Fingerprint: 212.227.126.183 moutng.kundenserver.de Received: from ([212.227.126.183:62602] helo=moutng.kundenserver.de) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id CE/B9-19568-AEF01644 for ; Tue, 09 May 2006 17:55:54 -0400 Received: from [88.72.205.29] (helo=localhost) by mrelayeu.kundenserver.de (node=mrelayeu9) with ESMTP (Nemesis), id 0ML2xA-1FdaBK2miD-0000Yu; Tue, 09 May 2006 23:55:50 +0200 To: Marcus Boerger , internals Date: Wed, 10 May 2006 00:13:40 +0200 User-Agent: KMail/1.9.1 References: <200605090132.11551.tm@ippfp.org> <273542913.20060509012314@marcus-boerger.de> In-Reply-To: <273542913.20060509012314@marcus-boerger.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <200605100013.40296.tm@ippfp.org> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:aa225b5806905afbf14d50f30346eb07 Subject: Re: [PHP-DEV] class inheritance From: tm@ippfp.org (Thomas Moenicke) Hi Marcus, Marcus Boerger wrote: > sure php is unlike c++ where everything is handled via vmt's that change > during construction. In php the ctors are called after the default values > are applied to every member variable. Actually the most outer ctor is being > called so in your case B's. If that is calling into A's ctor which is in > your case a c implementation you can easily access that member just as any > other. Thanks for pointing that out. I got segfaults while trying to access the arrays, but the problem was an uninitialized array. The zval->type == IS_ARRAY statement can protect the access. regards, Thomas