承接 amphp/serialization 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

amphp/serialization

最新稳定版本:v1.0.0

Composer 安装命令:

composer require amphp/serialization

包简介

Serialization tools for IPC and data storage in PHP.

README 文档

README

AMPHP is a collection of event-driven libraries for PHP designed with fibers and concurrency in mind. amphp/serialization is a library providing serialization tools for IPC and data storage in PHP.

Latest Release MIT License

Installation

This package can be installed as a Composer dependency.

composer require amphp/serialization

Serializer

The main interface of this library is Amp\Serialization\Serializer.

<?php

namespace Amp\Serialization;

interface Serializer
{
    /**
     * @param mixed $data
     *
     * @throws SerializationException
     */
    public function serialize($data): string;

    /**
     * @return mixed
     *
     * @throws SerializationException
     */
    public function unserialize(string $data);
}

JSON

JSON serialization can be used with the JsonSerializer.

Native Serialization

Native serialization (serialize / unserialize) can be used with the NativeSerializer.

Passthrough Serialization

Sometimes you already have a string and don't want to apply additional serialization. In these cases, you can use the PassthroughSerializer.

Compression

Often, serialized data can be compressed quite well. If you don't need interoperability with other systems deserializing the data, you can compress your serialized payloads by wrapping your Serializer instance in an CompressingSerializer.

Security

If you discover any security related issues, please email me@kelunik.com instead of using the issue tracker.

License

The MIT License (MIT). Please see LICENSE for more information.

统计信息

  • 总下载量: 45.22M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 130
  • 点击次数: 1
  • 依赖项目数: 19
  • 推荐数: 0

GitHub 信息

  • Stars: 130
  • Watchers: 7
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04