Re: [PHP3] Re: [PHP4BETA] Re: [PHP3] OO
| From: | Zeev Suraski | Date: | Sat, 07 Aug 1999 11:01:32 +0000 |
| Subject: | Re: [PHP3] Re: [PHP4BETA] Re: [PHP3] OO | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-3194@lists.php.net to get a copy of this message | ||
On 7 Aug 1999, Manuel Lemos wrote:
> Hello Zeev,
>
> On 05-Aug-99 05:19:55, you wrote:
>
> >At 01:32 05/08/99 , Manuel Lemos wrote:
> >>There is no mention in the documentation about being able to register more
> >>than one shut down function. Does that work like that in PHP 3 too?
>
> >Yes, it always has.
>
> Maybe the documentation needs to be more explict there.
It sure has to be - I simply haven't contributed to the documentation
project for about a year now, so I wasn't the one who wrote the
documentation for that function...
> I'm afraid I don't quite follow what you mean, maybe because I'm not sure
> what exactly is zval. Is zval a class pointer or a instance pointer? If
> you have multiple objects of the same class, shouldn't only there be only
> one zval for each object?
zval is the low-level value container used by Zend. With PHP 3.0 - things
were relatively easy - there was indeed just one zval (or pval) for each
object, more or less. With PHP 4.0, things are much more efficient, but
at the same time - much more complicated. A hundred objects may share the
same zval if they point to an object that looks the same. And under some
circumstances, that zval may split into two zvals, and 99 objects will
point at the original, while the 100th will point to the duplicate.
> I guess you mean that it would have to be the maintainer of the XML support
> module (Stig?) to learn how to do that from your register_shutdown_function
> example and add such kind of support, right?
Yes.
Zeev
--
-----------------------------------------------------
Zeev Suraski <zeev@zend.com> http://www.zend.com/
For a PGP public key, finger bourbon@netvision.net.il