Re: New handler for retrieving properties when object is serialized

From: Date: Fri, 26 Jul 2013 13:14:23 +0000
Subject: Re: New handler for retrieving properties when object is serialized
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
>
>
> This means one has to touch every extension using those hooks. "more use
> cases in the future" means having to do this over and over again, for a
> feature I see little benefit in.
>

I don't want to change get_properties. That would break too many
extensions. The idea is to create something like

HashTable *get_special_properties(zval *object, int purpose, int *is_tmp
TSRMLS_DC)

This would replace get_debug_info so the number of hooks would stay the
same.
The only extensions that would need to be changed are the ones that use
get_debug_info. The purposes could be debug, serialize, array_casting. If
there is
a new use case, you would just add new purpose and wouldn't have to change
anything.


>
> I haven't looked deeper but isn't your whole point to change the
> serialized representation of the object, to include all data "properly"?
>
>
No the whole point was returning the same properties but only if the object
is
serialized or debugged. Deeper explanation is in this thread:

http://news.php.net/php.internals/68305

Jakub


Thread (22 messages)

« previous php.internals (#68321) next »