Serialization

suggest change

Syntax

Parameters

Parameter | Details |

|———–|———| | value | The value to be serialized. serialize() handles all types, except the resource-type. You can even serialize() arrays that contain references to itself. Circular references inside the array/object you are serializing will also be stored. Any other reference will be lost. When serializing objects, PHP will attempt to call the member function __sleep() prior to serialization. This is to allow the object to do any last minute clean-up, etc. prior to being serialized. Likewise, when the object is restored using unserialize() the __wakeup() member function is called. Object’s private members have the class name prepended to the member name; protected members have a ‘*’ prepended to the member name. These prepended values have null bytes on either side. |

Remarks

Serialization uses following string structures:

[..] are placeholders.

Type | Structure | —–– | ——— | String | s:[size of string]:[value] | Integer | i:[value] | Double | d:[value] | Boolean | b:[value (true = 1 and false = 0)] | Null | N | Object | O:[object name size]:[object name]:[object size]:{[property name string definition]:[property value definition];(repeated for each property)} | Array | a:[size of array]:{[key definition];[value definition];(repeated for each key value pair)} |

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Serialization:
* Serialization

Table Of Contents
2 Arrays
4 Types
10 Cookies
14 JSON
15 SOAP
17 cURL
19 XML
21 Traits
35 UTF-8
36 URLs
38 PHPDoc
41 Loops
43 Serialization
44 Closur
72 YAML
77 Cache
78 Streams
81 PDO
82 SQLite3
83 Sockets
87 MongoDB
93 IMAP
94 Redis
95 Imagick
102 APCu
108 PSR