开发者

PHP Omit Variables from Serialization

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜