Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...

When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store


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 135. 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 136. Datatype merging (PHP to Python)

PHP Type Python Type
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 137. Datatype merging (Python to PHP)

Python-Type PHP-Type
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

Zend Framework