Swoole Serialize

Swoole provides a fast and high performance serialization module.

public static ReturnType Swoole\Serialize::pack ( string $data [, int $is_fast ] )

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

Serialize the data.

Parameter

Return

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

public static mixed Swoole\Serialize::unpack ( string $data [, string $args ] )

Alias: mixed swoole_serialize->unpack($data)

Unserialize the data.

Parameter

Return

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