/swoole_serialize

the fastest serialize function bound for php7

Primary LanguageCOtherNOASSERTION

swoole_serialize

require

  • PHP 7+

install

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。

use

$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);

contact us

License

Apache License Version 2.0 see http://www.apache.org/licenses/LICENSE-2.0.html