jedi58/reserializer
Composer 安装命令:
composer require jedi58/reserializer
包简介
关键字:
README 文档
README
PHP class that will take a serialised object and parse it, ignoring the sizes specified. This is useful when serialized objects are corrupted and need fixing
Usage
Reserializer::parse('s:21:"https://www.google.com";');
The above example contains an invalid serialized object as the string is one character longer than it should be. The parse function will take this, ignore the suggested length and will return the string ready to be reserialised. Alternatively, the class can do the whole process itself:
Reserializer::reserialize('s:21:"https://www.google.com";')
The expected output for this is s:22:"https://www.google.com";. It is possible to use this for more complicated examples of type bool, int, string, array, and objects. In the case of objects they will however be converted into stdClass.
Testing
There are a number of unit tests which can be executed by running the following from your checkout
$ phpunit
统计信息
- 总下载量: 65
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-04-07