Join 4,000+ others and never miss out on new tips, tutorials, and more.
4.x is outdated, please check the latest version 25.x
Latest version:
pecl install openswoole-25.2.0
Swoole provides a fast and high performance serialization module.
Swoole\Serialize->pack ( string $data [, int $is_fast ] )Alias: string swoole_serialize->pack(mixed $data, $is_fast = 0);
Serialize the data.
$data the data to serialize
$is_fast if enable fast mode
If the process of serialization succeeds, it returns the binary string as the result of serialization. Otherwise, it returns false.
mixed Swoole\Serialize->unpack ( string $data [, string $args ] )Alias: mixed swoole_serialize->unpack($data)
Unserialize the data.
$data the data to unserializeIf the process of unserialization succeeds, it returns the unserialized data. Otherwise, it returns false.