## guide : <?php $data = array(0=>1,1=>2,2=>3); $msg = msgpack_pack($data); $data = msgpack_unpack($msg); ?> --- //##test case # $array = array('1' => '111111', '2' => '22222'); # case 1: var_dump(msgpack_pack($array)); # case 2: var_dump(msgpack_unpack('?\001?\000???\002?\000\003d\016"')); --- # case 1 output: string(16) "?\001?111111\002?22222" # case 2 output: PHP Warning: [msgpack](php_msgpack_unserialize) Extra bytes in /WorkSpace/nala/erp/test.php on line 58 PHP Stack trace: PHP 1. {main}() /WorkSpace/nala/erp/test.php:0 PHP 2. msgpack_unpack() /WorkSpace/nala/erp/test.php:58 Warning: [msgpack](php_msgpack_unserialize) Extra bytes in /WorkSpace/nala/erp/test.php on line 58 Call Stack: 0.0003 234248 1. {main}() /WorkSpace/nala/erp/test.php:0 0.0331 983072 2. msgpack_unpack() /WorkSpace/nala/erp/test.php:58
Activity