Methods
Serialize PHP to PythonPickle format
serialize(mixed $value) : string
Parameters
$value
mixed
Exceptions
Returns
string
  
Unserialize from Python Pickle format to PHP
unserialize(string $pickle) : mixed
Parameters
$pickle
string
Exceptions
Returns
mixed
  
Convert a unicode sequence to UTF-8
_convertMatchingUnicodeSequence2Utf8(array $match) : string
Parameters
$match
array
Returns
string
  
Load an empty dictionary
_loadEmptyDict() 
 
Clear temp variables needed for processing
clearProcessVars() 
 
Decode a binary long sequence
decodeBinLong(string $data) : int | float | string
Parameters
$data
string
Returns
intfloatstring
  
Convert a hex string to a UTF-8 string
hex2Utf8(string $hex) : string
Parameters
$hex
string
Exceptions
Returns
string
  
Return last marker position in stack
lastMarker() : int
 
Load a pickle opcode
load(string $op) 
Parameters
$op
string
Exceptions
  
Load an append (to list) sequence
loadAppend() 
 
Load multiple append (to list) sequences at once
loadAppends() 
 
Load arbitrary binary bytes
loadBinBytes() 
 
Load a binary float value
loadBinFloat() 
 
Load a binary GET operation
loadBinGet() 
 
Load a binary integer operator
loadBinInt() 
 
Load the first byte of a binary integer
loadBinInt1() 
 
Load the second byte of a binary integer
loadBinInt2() 
 
Load a binary string
loadBinString() 
 
Load binary unicode sequence
loadBinUnicode() 
 
Load an associative array (Python dictionary)
loadDict() 
 
Load an empty list sequence
loadEmptyList() 
 
Load a float value
loadFloat() 
 
Load a GET operation
loadGet() 
 
Load an integer operator
loadInt() 
 
Load an array (list)
loadList() 
 
Load a long (float) operator
loadLong() 
 
Load a one byte long integer
loadLong1() 
 
Load a 4 byte long integer
loadLong4() 
 
Load a long binary GET operation
loadLongBinGet() 
 
Load a marker sequence
loadMark() 
 
Load a boolean FALSE operator
loadNewFalse() 
 
Load a boolean TRUE operator
loadNewTrue() 
 
Load a NONE operator
loadNone() 
 
Load a proto value
loadProto() 
 
Load a PUT opcode
loadPut() 
 
Load an item from a set
loadSetItem() 
 
Load set items
loadSetItems() 
 
Load a single binary byte
loadShortBinBytes() 
 
Load a short binary string
loadShortBinString() 
 
Load a string
loadString() 
 
Load single item tuple
loadTuple1() 
 
Load two item tuple
loadTuple2() 
 
Load three item tuple
loadTuple3() 
 
Load a unicode string
loadUnicode() 
 
Add a value to the memo and write the id
memorize(mixed $value) 
 
Quote/Escape a string
quoteString(string $str) : string
Parameters
$str
string
Returns
stringquoted string
  
Read a segment of the pickle
read(mixed $len) : string
Parameters
$len
mixed
Exceptions
Returns
string
  
Read a line of the pickle at once
readline() : string
Exceptions
Returns
string
  
Search a value in the memo and return  the id
searchMemo(mixed $value) : int | bool
Parameters
$value
mixed
Returns
intboolThe id or false
  
Unquote/Unescape a quoted string
unquoteString(string $str) : string
Parameters
Returns
stringunquoted string
  
Write a value
write(mixed $value) 
Parameters
$value
mixed
Exceptions
  
Write an associative array value as dictionary
writeArrayDict(array | \Traversable $value) 
Parameters
$value
array\Traversable
  
Write a simple array value as list
writeArrayList(array $value) 
 
Write boolean value
writeBool(bool $value) 
 
Write a float value
writeFloat(float $value) 
 
Write a get
writeGet(int $id) 
 
Write an integer value
writeInt(int $value) 
 
Write a null as None
writeNull() 
 
Write an object as a dictionary
writeObject(object $value) 
 
Write pickle protocol
writeProto(int $protocol) 
 
Write a put
writePut(int $id) 
 
Write a string value
writeString(string $value) 
 
 Properties
 
 
Whether or not the system is little-endian
$isLittleEndian : bool
 
 
 
 
 
 
 
 
 
<p>Strings representing quotes</p>
$quoteString : array
 
 
 Constants
 
 
 
 
 
 
 
 
 
OP_BINPERSID
OP_BINPERSID 
 
 
 
OP_BINSTRING
OP_BINSTRING 
 
 
OP_BINUNICODE
OP_BINUNICODE 
 
 
 
 
 
OP_EMPTY_DICT
OP_EMPTY_DICT 
 
 
OP_EMPTY_LIST
OP_EMPTY_LIST 
 
 
OP_EMPTY_TUPLE
OP_EMPTY_TUPLE 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
OP_LONG_BINGET
OP_LONG_BINGET 
 
 
 
Pickle opcodes.
OP_MARK 
See pickletools.py for extensive docs.
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
OP_SHORT_BINBYTES
OP_SHORT_BINBYTES 
 
 
OP_SHORT_BINSTRING
OP_SHORT_BINSTRING