Re: class inheritance

From: Date: Tue, 09 May 2006 22:13:40 +0000
Subject: Re: class inheritance
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-23220@lists.php.net to get a copy of this message
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

« previous php.internals (#23220) next »