Re: Serializing references - part I
| From: | Stanislav Malyshev | Date: | Tue, 24 Oct 2000 08:54:11 +0000 |
| Subject: | Re: Serializing references - part I | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-35966@lists.php.net to get a copy of this message | ||
SS>> This can be improved by making the interface independent from
SS>> the implementation. As your patch shows, changing the
SS>> implementation requires changes all over our codebase which
SS>> should not be necessary in the ideal case.
Well, you should build the hash somewhere. You cannot do it in
php_var_serialize, since it's recursive. What do you propose? I can make
another layer below php_var_serialize, but this will mean I could not use
the same hash for a number of vars, which is desirable for sessions.
Do you have some other proposal?
SS>> I'm unsure about whether requiring users to register all
SS>> references of a zval as session variables to maintain
SS>> references makes sense. It is not something I'd like at all.
Otherwise, there's no point in it. What was the problem? If you have $foo
and $var being reference-bound, and register both, you lose the
binding. If you register only one, you lose binding in any case, just
because other one won't exist in time of next request. So, naturally,
preserving references would span only on serialized
(registered) variables.
--
Stanislav Malyshev, Zend Products Engineer
stas@zend.com http://www.zend.com/ +972-3-6139665 ext.106