OpenSwoole Serialize (Depreciation)

Latest version: pecl install openswoole-22.1.2 | composer require openswoole/core:22.1.5

This class or function have been deprecated.

OpenSwoole provides a fast and high performance serialization module.

OpenSwoole\Serialize->pack ( string $data [, int $is_fast ] )

Alias: string swoole_serialize->pack(mixed $data, $is_fast = 0);

Serialize the data.

Parameter
  • $data the data to serialize

  • $is_fast if enable fast mode

Return

If the process of serialization succeeds, it returns the binary string as the result of serialization. Otherwise, it returns false.

mixed OpenSwoole\Serialize->unpack ( string $data [, string $args ] )

Alias: mixed swoole_serialize->unpack($data)

Unserialize the data.

Parameter
  • $data the data to unserialize
Return

If the process of unserialization succeeds, it returns the unserialized data. Otherwise, it returns false.

Last updated on September 1, 2022