This adapter converts PHP types to a Python Pickle string representation. With it, you can read the serialized data with Python and read Pickled data of Python with PHP.
Available options include:
Table 131. Zend_Serializer_Adapter_PythonPickle Options
| Option | Data Type | Default Value | Description |
|---|---|---|---|
| protocol | integer (0 | 1 | 2 | 3) | 0 |
The Pickle protocol version used on
serialize
|
Datatype merging (PHP to Python) occurs as follows:
Table 132. Datatype merging (PHP to Python)
| PHP Type | Python Type |
|---|---|
| NULL | None |
| boolean | boolean |
| integer | integer |
| float | float |
| string | string |
| array | list |
| associative array | dictionary |
| object | dictionary |
Datatype merging (Python to PHP) occurs per the following:
Table 133. Datatype merging (Python to PHP)
| Python-Type | PHP-Type |
|---|---|
| None | NULL |
| boolean | boolean |
| integer | integer |
| long |
integer | float | string
| Zend_Serializer_Exception
|
| float | float |
| string | string |
| bytes | string |
| Unicode string | UTF-8 string |
| list | array |
| tuple | array |
| dictionary | associative array |
| All other types | Zend_Serializer_Exception |




