- PHP 7+
pecl install swoole_serialize
or
phpize=>./configure=>make install=>echo "extension=xx/swoole_serialize.so">>php.ini
##features:
- the fastest serialize function for php7(see bench.php,or you can bench it use you data,trust me it is cool!)。
- support pack and fastPack two function.
- support __sleep __wakeup __autoload etc。
$str = swoole_pack($arr);
$arr = swoole_unpack($str);
$str = swoole_fast_pack($arr);
$arr = swoole_unpack($str);
or
$str = swSerialize::pack($arr);
$arr = swSerialize::unpack($str);
$str = swSerialize::fastPack($arr);
$arr = swSerialize::unpack($str);
or
$o = new swSerialize();
$str = $o->pack($arr);
$o->unpack($str);
$o = new swSerialize();
$str = $o->fastPack($arr);
$o->unpack($str);
Apache License Version 2.0 see http://www.apache.org/licenses/LICENSE-2.0.html