msgpack.org[PHP]
This extension provides an API for communicating with MessagePack serialization.
MessagePack is a binary-based efficient object serialization library. It enables to exchange structured objects between many languages just like JSON. But unlike JSON, it is very fast and small.
Msgpack is a PECL extension, thus you can simply install it by:
pecl install msgpack/path/to/phpize
./configure --with-php-config=/path/to/php-config
make && make install 1, 1 => 2, 2 => 3);
$msg = msgpack_pack($data);
$data = msgpack_unpack($msg); 1, 1 => 2, 2 => 3);
$packer = new \MessagePack(false);
// ^ same as $packer->setOption(\MessagePack::OPT_PHPONLY, false);
$packed = $packer->pack($data);
$unpacker = new \MessagePackUnpacker(false);
// ^ same as $unpacker->setOption(\MessagePack::OPT_PHPONLY, false);
$unpacker->feed($packed);
$unpacker->execute();
$unpacked = $unpacker->data();
$unpacker->reset();…No open issues yet, or sync has not completed.