ID:               39635
 Comment by:       spam at thishell dot com
 Reported By:      t dot prochazka at centrum dot cz
 Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: all
 PHP Version:      5CVS-2006-11-26 (CVS)
 New Comment:

While it is possible to exclude members from serialization using
__sleep(), it has downsides:
- Using get_object_vars($this) to return the members is extremely slow
- Manually maintaining an array with the members is error prone and can
be quite some work

A transient keyword to exclude members from serialization would make it
easier ...


Previous Comments:
------------------------------------------------------------------------

[2006-11-26 11:40:40] t dot prochazka at centrum dot cz

Description:
------------
PHP has no advanced support for serialization.

I think, that is problem, that PHP serialize all properties. What about
add single keyword (as transient) for property which can't be
serializable?

Example:

class Foo {
 
 public $a;
 public transient $b;

}

Description of Java transient keyword:

http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#78119



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=39635&edit=1

Reply via email to