Is it possible to omit certain variables from serialization? Say I have a temporary variable in a php object that I don't want serialized as it is a waste of space. The only thing I can think of is making them static but this is not ideal as it is not really part of t开发者_如何转开发he object which there will be many instances of.
This may not even be possible but would love to hear some ideas.
Take advantage of the __sleep method of your object.
精彩评论