PhpRiot
Follow phpriot on Twitter
Sponsored Link
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
Free iPad/iPhone App
Available on the App Store

  • PHP manual
  • Zend Framework manual
  • Smarty manual
  • PHP articles
  • PHP training

Zend_Serializer_Adapter_PythonPickle

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

Zend Framework