{"id":13624074,"url":"https://github.com/rybakit/msgpack.php","last_synced_at":"2025-05-15T20:04:24.912Z","repository":{"id":53719716,"uuid":"44544970","full_name":"rybakit/msgpack.php","owner":"rybakit","description":"A pure PHP implementation of the MessagePack serialization format / msgpack.org[PHP]","archived":false,"fork":false,"pushed_at":"2023-06-18T20:26:47.000Z","size":453,"stargazers_count":395,"open_issues_count":1,"forks_count":19,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-05-14T19:47:09.912Z","etag":null,"topics":["messagepack","msgpack","php","serialization"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rybakit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["rybakit"]}},"created_at":"2015-10-19T15:37:02.000Z","updated_at":"2025-05-13T03:07:52.000Z","dependencies_parsed_at":"2024-01-03T02:23:02.911Z","dependency_job_id":"40f0145b-f9cf-4f42-9fd7-1d55451dabc8","html_url":"https://github.com/rybakit/msgpack.php","commit_stats":{"total_commits":352,"total_committers":7,"mean_commits":"50.285714285714285","dds":0.5738636363636364,"last_synced_commit":"68343ecef659f722d649ea33b033bcc324639318"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rybakit%2Fmsgpack.php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rybakit%2Fmsgpack.php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rybakit%2Fmsgpack.php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rybakit%2Fmsgpack.php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rybakit","download_url":"https://codeload.github.com/rybakit/msgpack.php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254414499,"owners_count":22067272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["messagepack","msgpack","php","serialization"],"created_at":"2024-08-01T21:01:38.586Z","updated_at":"2025-05-15T20:04:22.484Z","avatar_url":"https://github.com/rybakit.png","language":"PHP","readme":"# msgpack.php\n\n[![Quality Assurance](https://github.com/rybakit/msgpack.php/workflows/QA/badge.svg)](https://github.com/rybakit/msgpack.php/actions?query=workflow%3AQA)\n[![Code Coverage](https://scrutinizer-ci.com/g/rybakit/msgpack.php/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/rybakit/msgpack.php/?branch=master)\n[![Mentioned in Awesome PHP](https://awesome.re/mentioned-badge.svg)](https://github.com/ziadoz/awesome-php#data-structure-and-storage)\n\nA pure PHP implementation of the [MessagePack](https://msgpack.org/) serialization format.\n\n\n## Features\n\n * Fully compliant with the latest [MessagePack specification](https://github.com/msgpack/msgpack/blob/master/spec.md)\n * Supports [streaming unpacking](#unpacking)\n * Supports [unsigned 64-bit integers handling](#unpacking-options)\n * Supports [object serialization](#custom-types)\n * [Fully tested](https://github.com/rybakit/msgpack.php/actions?query=workflow%3AQA)\n * [Relatively fast](#performance)\n\n\n## Table of contents\n\n * [Installation](#installation)\n * [Usage](#usage)\n   * [Packing](#packing)\n     * [Packing options](#packing-options)\n   * [Unpacking](#unpacking)\n     * [Unpacking options](#unpacking-options)\n * [Custom types](#custom-types)\n   * [Type objects](#type-objects)\n   * [Type transformers](#type-transformers)\n   * [Extensions](#extensions)\n     * [Timestamp](#timestamp)\n     * [Application-specific extensions](#application-specific-extensions)\n * [Exceptions](#exceptions)\n * [Tests](#tests)\n    * [Fuzzing](#fuzzing)\n    * [Performance](#performance)\n * [License](#license)\n\n\n## Installation\n\nThe recommended way to install the library is through [Composer](http://getcomposer.org):\n\n```sh\ncomposer require rybakit/msgpack\n```\n\n\n## Usage\n\n### Packing\n\nTo pack values you can either use an instance of a `Packer`:\n\n```php\n$packer = new Packer();\n$packed = $packer-\u003epack($value);\n```\n\nor call a static method on the `MessagePack` class:\n\n```php\n$packed = MessagePack::pack($value);\n```\n\nIn the examples above, the method `pack` automatically packs a value depending on its type. However, not all PHP types \ncan be uniquely translated to MessagePack types. For example, the MessagePack format defines `map` and `array` types, \nwhich are represented by a single `array` type in PHP. By default, the packer will pack a PHP array as a MessagePack \narray if it has sequential numeric keys, starting from `0` and as a MessagePack map otherwise:\n\n```php\n$mpArr1 = $packer-\u003epack([1, 2]);               // MP array [1, 2]\n$mpArr2 = $packer-\u003epack([0 =\u003e 1, 1 =\u003e 2]);     // MP array [1, 2]\n$mpMap1 = $packer-\u003epack([0 =\u003e 1, 2 =\u003e 3]);     // MP map {0: 1, 2: 3}\n$mpMap2 = $packer-\u003epack([1 =\u003e 2, 2 =\u003e 3]);     // MP map {1: 2, 2: 3}\n$mpMap3 = $packer-\u003epack(['a' =\u003e 1, 'b' =\u003e 2]); // MP map {a: 1, b: 2}\n```\n\nHowever, sometimes you need to pack a sequential array as a MessagePack map.\nTo do this, use the `packMap` method:\n\n```php\n$mpMap = $packer-\u003epackMap([1, 2]); // {0: 1, 1: 2}\n```\n\nHere is a list of type-specific packing methods:\n\n```php\n$packer-\u003epackNil();           // MP nil\n$packer-\u003epackBool(true);      // MP bool\n$packer-\u003epackInt(42);         // MP int\n$packer-\u003epackFloat(M_PI);     // MP float (32 or 64)\n$packer-\u003epackFloat32(M_PI);   // MP float 32\n$packer-\u003epackFloat64(M_PI);   // MP float 64\n$packer-\u003epackStr('foo');      // MP str\n$packer-\u003epackBin(\"\\x80\");     // MP bin\n$packer-\u003epackArray([1, 2]);   // MP array\n$packer-\u003epackMap(['a' =\u003e 1]); // MP map\n$packer-\u003epackExt(1, \"\\xaa\");  // MP ext\n```\n\n\u003e *Check the [\"Custom types\"](#custom-types) section below on how to pack custom types.*\n\n\n#### Packing options\n\nThe `Packer` object supports a number of bitmask-based options for fine-tuning \nthe packing process (defaults are in bold):\n\n| Name                 | Description                                                   |\n| -------------------- | ------------------------------------------------------------- |\n| **`FORCE_STR`**      | Forces PHP strings to be packed as MessagePack UTF-8 strings  |\n| `FORCE_BIN`          | Forces PHP strings to be packed as MessagePack binary data    |\n| `DETECT_STR_BIN`     | Detects MessagePack str/bin type automatically                |\n|                      |                                                               |\n| `FORCE_ARR`          | Forces PHP arrays to be packed as MessagePack arrays          |\n| `FORCE_MAP`          | Forces PHP arrays to be packed as MessagePack maps            |\n| **`DETECT_ARR_MAP`** | Detects MessagePack array/map type automatically              |\n|                      |                                                               |\n| `FORCE_FLOAT32`      | Forces PHP floats to be packed as 32-bits MessagePack floats  |\n| **`FORCE_FLOAT64`**  | Forces PHP floats to be packed as 64-bits MessagePack floats  |\n\n\u003e *The type detection mode (`DETECT_STR_BIN`/`DETECT_ARR_MAP`) adds some overhead \n\u003e which can be noticed when you pack large (16- and 32-bit) arrays or strings. \n\u003e However, if you know the value type in advance (for example, you only work with \n\u003e UTF-8 strings or/and associative arrays), you can eliminate this overhead by \n\u003e forcing the packer to use the appropriate type, which will save it from running \n\u003e the auto-detection routine. Another option is to explicitly specify the value \n\u003e type. The library provides 2 auxiliary classes for this, `Map` and `Bin`. \n\u003e Check the [\"Custom types\"](#custom-types) section below for details.*\n\nExamples:\n\n```php\n// detect str/bin type and pack PHP 64-bit floats (doubles) to MP 32-bit floats\n$packer = new Packer(PackOptions::DETECT_STR_BIN | PackOptions::FORCE_FLOAT32);\n\n// these will throw MessagePack\\Exception\\InvalidOptionException\n$packer = new Packer(PackOptions::FORCE_STR | PackOptions::FORCE_BIN);\n$packer = new Packer(PackOptions::FORCE_FLOAT32 | PackOptions::FORCE_FLOAT64);\n```\n\n\n### Unpacking\n\nTo unpack data you can either use an instance of a `BufferUnpacker`:\n\n```php\n$unpacker = new BufferUnpacker();\n\n$unpacker-\u003ereset($packed);\n$value = $unpacker-\u003eunpack();\n```\n\nor call a static method on the `MessagePack` class:\n\n```php\n$value = MessagePack::unpack($packed);\n```\n\nIf the packed data is received in chunks (e.g. when reading from a stream), use the `tryUnpack` method, which attempts \nto unpack data and returns an array of unpacked messages (if any) instead of throwing an `InsufficientDataException`:\n\n```php\nwhile ($chunk = ...) {\n    $unpacker-\u003eappend($chunk);\n    if ($messages = $unpacker-\u003etryUnpack()) {\n        return $messages;\n    }\n}\n```\n\nIf you want to unpack from a specific position in a buffer, use `seek`:\n\n```php\n$unpacker-\u003eseek(42); // set position equal to 42 bytes\n$unpacker-\u003eseek(-8); // set position to 8 bytes before the end of the buffer\n```\n\nTo skip bytes from the current position, use `skip`:\n\n```php\n$unpacker-\u003eskip(10); // set position to 10 bytes ahead of the current position\n```\n\nTo get the number of remaining (unread) bytes in the buffer:\n\n```php\n$unreadBytesCount = $unpacker-\u003egetRemainingCount();\n```\n\nTo check whether the buffer has unread data:\n\n```php\n$hasUnreadBytes = $unpacker-\u003ehasRemaining();\n```\n\nIf needed, you can remove already read data from the buffer by calling:\n\n```php\n$releasedBytesCount = $unpacker-\u003erelease();\n```\n\nWith the `read` method you can read raw (packed) data:\n\n```php\n$packedData = $unpacker-\u003eread(2); // read 2 bytes\n```\n\nBesides the above methods `BufferUnpacker` provides type-specific unpacking methods, namely:\n\n```php\n$unpacker-\u003eunpackNil();   // PHP null\n$unpacker-\u003eunpackBool();  // PHP bool\n$unpacker-\u003eunpackInt();   // PHP int\n$unpacker-\u003eunpackFloat(); // PHP float\n$unpacker-\u003eunpackStr();   // PHP UTF-8 string\n$unpacker-\u003eunpackBin();   // PHP binary string\n$unpacker-\u003eunpackArray(); // PHP sequential array\n$unpacker-\u003eunpackMap();   // PHP associative array\n$unpacker-\u003eunpackExt();   // PHP MessagePack\\Type\\Ext object\n```\n\n\n#### Unpacking options\n\nThe `BufferUnpacker` object supports a number of bitmask-based options for fine-tuning \nthe unpacking process (defaults are in bold):\n\n| Name                | Description                                                              |\n| ------------------- | ------------------------------------------------------------------------ |\n| **`BIGINT_AS_STR`** | Converts overflowed integers to strings \u003csup\u003e[1]\u003c/sup\u003e                   |\n| `BIGINT_AS_GMP`     | Converts overflowed integers to `GMP` objects \u003csup\u003e[2]\u003c/sup\u003e             |\n| `BIGINT_AS_DEC`     | Converts overflowed integers to `Decimal\\Decimal` objects \u003csup\u003e[3]\u003c/sup\u003e |\n\n\u003e *1. The binary MessagePack format has unsigned 64-bit as its largest integer \n\u003e     data type, but PHP does not support such integers, which means that \n\u003e     an overflow can occur during unpacking.*\n\u003e\n\u003e *2. Make sure the [GMP](http://php.net/manual/en/book.gmp.php) extension \n\u003e     is enabled.*\n\u003e\n\u003e *3. Make sure the [Decimal](http://php-decimal.io/) extension is enabled.*\n\n\nExamples:\n\n```php\n$packedUint64 = \"\\xcf\".\"\\xff\\xff\\xff\\xff\".\"\\xff\\xff\\xff\\xff\";\n\n$unpacker = new BufferUnpacker($packedUint64);\nvar_dump($unpacker-\u003eunpack()); // string(20) \"18446744073709551615\"\n\n$unpacker = new BufferUnpacker($packedUint64, UnpackOptions::BIGINT_AS_GMP);\nvar_dump($unpacker-\u003eunpack()); // object(GMP) {...}\n\n$unpacker = new BufferUnpacker($packedUint64, UnpackOptions::BIGINT_AS_DEC);\nvar_dump($unpacker-\u003eunpack()); // object(Decimal\\Decimal) {...}\n```\n\n\n### Custom types\n\nIn addition to the [basic types](https://github.com/msgpack/msgpack/blob/master/spec.md#type-system), the library \nprovides functionality to serialize and deserialize arbitrary types. This can be done in several ways, depending \non your use case. Let's take a look at them.\n\n#### Type objects\n\nIf you need to *serialize* an instance of one of your classes into one of the basic MessagePack types, the best way \nto do this is to implement the [CanBePacked](src/CanBePacked.php) interface in the class. A good example of such \na class is the `Map` type class that comes with the library. This type is useful when you want to explicitly specify \nthat a given PHP array should be packed as a MessagePack map without triggering an automatic type detection routine:\n\n```php\n$packer = new Packer();\n\n$packedMap = $packer-\u003epack(new Map([1, 2, 3]));\n$packedArray = $packer-\u003epack([1, 2, 3]);\n```\n\n\u003e *More type examples can be found in the [src/Type](src/Type) directory.*\n\n#### Type transformers\n\nAs with type objects, type transformers are only responsible for *serializing* values. They should be \nused when you need to serialize a value that does not implement the [CanBePacked](src/CanBePacked.php) \ninterface. Examples of such values could be instances of built-in or third-party classes that you don't \nown, or non-objects such as resources. \n\nA transformer class must implement the [CanPack](src/CanPack.php) interface. To use a transformer, \nit must first be registered in the packer. Here is an example of how to serialize PHP streams into \nthe MessagePack `bin` format type using one of the supplied transformers, `StreamTransformer`:\n\n```php\n$packer = new Packer(null, [new StreamTransformer()]);\n\n$packedBin = $packer-\u003epack(fopen('/path/to/file', 'r+'));\n```\n\n\u003e *More type transformer examples can be found in the [src/TypeTransformer](src/TypeTransformer) directory.*\n\n#### Extensions\n\nIn contrast to the cases described above, extensions are intended to handle\n[extension types](https://github.com/msgpack/msgpack/blob/master/spec.md#extension-types)\nand are responsible for both *serialization* and *deserialization* of values (types). \n\nAn extension class must implement the [Extension](src/Extension.php) interface. To use an extension, \nit must first be registered in the packer and the unpacker.\n\nThe MessagePack specification divides extension types into two groups: *predefined* and *application-specific*. \nCurrently, there is only one predefined type in the specification, Timestamp.\n\n##### Timestamp\n\nThe Timestamp extension type is a [predefined](https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type) \ntype. Support for this type in the library is done through the `TimestampExtension` class. This class is responsible \nfor handling `Timestamp` objects, which represent the number of seconds and optional adjustment in nanoseconds:\n\n```php\n$timestampExtension = new TimestampExtension();\n\n$packer = new Packer();\n$packer = $packer-\u003eextendWith($timestampExtension);\n\n$unpacker = new BufferUnpacker();\n$unpacker = $unpacker-\u003eextendWith($timestampExtension);\n\n$packedTimestamp = $packer-\u003epack(Timestamp::now());\n$timestamp = $unpacker-\u003ereset($packedTimestamp)-\u003eunpack();\n\n$seconds = $timestamp-\u003egetSeconds();\n$nanoseconds = $timestamp-\u003egetNanoseconds();\n```\n\nWhen using the `MessagePack` class, the Timestamp extension is already registered:\n\n```php\n$packedTimestamp = MessagePack::pack(Timestamp::now());\n$timestamp = MessagePack::unpack($packedTimestamp);\n```\n\n##### Application-specific extensions\n\nIn addition, the format can be extended with your own types. For example, to make the built-in PHP `DateTime` objects \nfirst-class citizens in your code, you can create a corresponding extension, as shown in the [example](examples/MessagePack/DateTimeExtension.php).\nPlease note, that custom extensions have to be registered with a unique extension ID (an integer from `0` to `127`).\n\n\u003e *More extension examples can be found in the [examples/MessagePack](examples/MessagePack) directory.*\n\n\u003e *To learn more about how extension types can be useful, check out this \n\u003e [article](https://dev.to/tarantool/advanced-messagepack-capabilities-4735).*\n\n\n## Exceptions\n\nIf an error occurs during packing/unpacking, a `PackingFailedException` or an `UnpackingFailedException` \nwill be thrown, respectively. In addition, an `InsufficientDataException` can be thrown during unpacking.\n\nAn `InvalidOptionException` will be thrown in case an invalid option (or a combination of mutually \nexclusive options) is used.\n\n\n## Tests\n\nRun tests as follows:\n\n```sh\nvendor/bin/phpunit\n```\n\nAlso, if you already have Docker installed, you can run the tests in a docker container. First, create a container:\n\n```sh\n./dockerfile.sh | docker build -t msgpack -\n```\n\nThe command above will create a container named `msgpack` with PHP 8.2 runtime. You may change the default runtime \nby defining the `PHP_IMAGE` environment variable:\n\n```sh\nPHP_IMAGE='php:8.1-cli' ./dockerfile.sh | docker build -t msgpack -\n```\n\n\u003e *See a list of various images [here](https://hub.docker.com/_/php).*\n\nThen run the unit tests:\n\n```sh\ndocker run --rm -v $PWD:/msgpack -w /msgpack msgpack\n```\n\n\n#### Fuzzing\n\nTo ensure that the unpacking works correctly with malformed/semi-malformed data, you can use a testing technique \ncalled [Fuzzing](https://en.wikipedia.org/wiki/Fuzzing). The library ships with a help file (target) \nfor [PHP-Fuzzer](https://github.com/nikic/PHP-Fuzzer) and can be used as follows:\n\n```sh\nphp-fuzzer fuzz tests/fuzz_buffer_unpacker.php\n```\n\n\n#### Performance\n\nTo check performance, run:\n\n```sh\nphp -n -dzend_extension=opcache.so \\\n-dpcre.jit=1 -dopcache.enable=1 -dopcache.enable_cli=1 \\\ntests/bench.php\n```\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eExample output\u003c/strong\u003e\u003c/summary\u003e\n\n```\nFilter: MessagePack\\Tests\\Perf\\Filter\\ListFilter\nRounds: 3\nIterations: 100000\n\n=============================================\nTest/Target            Packer  BufferUnpacker\n---------------------------------------------\nnil .................. 0.0030 ........ 0.0139\nfalse ................ 0.0037 ........ 0.0144\ntrue ................. 0.0040 ........ 0.0137\n7-bit uint #1 ........ 0.0052 ........ 0.0120\n7-bit uint #2 ........ 0.0059 ........ 0.0114\n7-bit uint #3 ........ 0.0061 ........ 0.0119\n5-bit sint #1 ........ 0.0067 ........ 0.0126\n5-bit sint #2 ........ 0.0064 ........ 0.0132\n5-bit sint #3 ........ 0.0066 ........ 0.0135\n8-bit uint #1 ........ 0.0078 ........ 0.0200\n8-bit uint #2 ........ 0.0077 ........ 0.0212\n8-bit uint #3 ........ 0.0086 ........ 0.0203\n16-bit uint #1 ....... 0.0111 ........ 0.0271\n16-bit uint #2 ....... 0.0115 ........ 0.0260\n16-bit uint #3 ....... 0.0103 ........ 0.0273\n32-bit uint #1 ....... 0.0116 ........ 0.0326\n32-bit uint #2 ....... 0.0118 ........ 0.0332\n32-bit uint #3 ....... 0.0127 ........ 0.0325\n64-bit uint #1 ....... 0.0140 ........ 0.0277\n64-bit uint #2 ....... 0.0134 ........ 0.0294\n64-bit uint #3 ....... 0.0134 ........ 0.0281\n8-bit int #1 ......... 0.0086 ........ 0.0241\n8-bit int #2 ......... 0.0089 ........ 0.0225\n8-bit int #3 ......... 0.0085 ........ 0.0229\n16-bit int #1 ........ 0.0118 ........ 0.0280\n16-bit int #2 ........ 0.0121 ........ 0.0270\n16-bit int #3 ........ 0.0109 ........ 0.0274\n32-bit int #1 ........ 0.0128 ........ 0.0346\n32-bit int #2 ........ 0.0118 ........ 0.0339\n32-bit int #3 ........ 0.0135 ........ 0.0368\n64-bit int #1 ........ 0.0138 ........ 0.0276\n64-bit int #2 ........ 0.0132 ........ 0.0286\n64-bit int #3 ........ 0.0137 ........ 0.0274\n64-bit int #4 ........ 0.0180 ........ 0.0285\n64-bit float #1 ...... 0.0134 ........ 0.0284\n64-bit float #2 ...... 0.0125 ........ 0.0275\n64-bit float #3 ...... 0.0126 ........ 0.0283\nfix string #1 ........ 0.0035 ........ 0.0133\nfix string #2 ........ 0.0094 ........ 0.0216\nfix string #3 ........ 0.0094 ........ 0.0222\nfix string #4 ........ 0.0091 ........ 0.0241\n8-bit string #1 ...... 0.0122 ........ 0.0301\n8-bit string #2 ...... 0.0118 ........ 0.0304\n8-bit string #3 ...... 0.0119 ........ 0.0315\n16-bit string #1 ..... 0.0150 ........ 0.0388\n16-bit string #2 ..... 0.1545 ........ 0.1665\n32-bit string ........ 0.1570 ........ 0.1756\nwide char string #1 .. 0.0091 ........ 0.0236\nwide char string #2 .. 0.0122 ........ 0.0313\n8-bit binary #1 ...... 0.0100 ........ 0.0302\n8-bit binary #2 ...... 0.0123 ........ 0.0324\n8-bit binary #3 ...... 0.0126 ........ 0.0327\n16-bit binary ........ 0.0168 ........ 0.0372\n32-bit binary ........ 0.1588 ........ 0.1754\nfix array #1 ......... 0.0042 ........ 0.0131\nfix array #2 ......... 0.0294 ........ 0.0367\nfix array #3 ......... 0.0412 ........ 0.0472\n16-bit array #1 ...... 0.1378 ........ 0.1596\n16-bit array #2 ........... S ............. S\n32-bit array .............. S ............. S\ncomplex array ........ 0.1865 ........ 0.2283\nfix map #1 ........... 0.0725 ........ 0.1048\nfix map #2 ........... 0.0319 ........ 0.0405\nfix map #3 ........... 0.0356 ........ 0.0665\nfix map #4 ........... 0.0465 ........ 0.0497\n16-bit map #1 ........ 0.2540 ........ 0.3028\n16-bit map #2 ............. S ............. S\n32-bit map ................ S ............. S\ncomplex map .......... 0.2372 ........ 0.2710\nfixext 1 ............. 0.0283 ........ 0.0358\nfixext 2 ............. 0.0291 ........ 0.0371\nfixext 4 ............. 0.0302 ........ 0.0355\nfixext 8 ............. 0.0288 ........ 0.0384\nfixext 16 ............ 0.0293 ........ 0.0359\n8-bit ext ............ 0.0302 ........ 0.0439\n16-bit ext ........... 0.0334 ........ 0.0499\n32-bit ext ........... 0.1845 ........ 0.1888\n32-bit timestamp #1 .. 0.0337 ........ 0.0547\n32-bit timestamp #2 .. 0.0335 ........ 0.0560\n64-bit timestamp #1 .. 0.0371 ........ 0.0575\n64-bit timestamp #2 .. 0.0374 ........ 0.0542\n64-bit timestamp #3 .. 0.0356 ........ 0.0533\n96-bit timestamp #1 .. 0.0362 ........ 0.0699\n96-bit timestamp #2 .. 0.0381 ........ 0.0701\n96-bit timestamp #3 .. 0.0367 ........ 0.0687\n=============================================\nTotal                  2.7618          4.0820\nSkipped                     4               4\nFailed                      0               0\nIgnored                     0               0\n```\n\u003c/details\u003e\n\n*With JIT:*\n\n```sh\nphp -n -dzend_extension=opcache.so \\\n-dpcre.jit=1 -dopcache.jit_buffer_size=64M -dopcache.jit=tracing -dopcache.enable=1 -dopcache.enable_cli=1 \\\ntests/bench.php\n```\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eExample output\u003c/strong\u003e\u003c/summary\u003e\n\n```\nFilter: MessagePack\\Tests\\Perf\\Filter\\ListFilter\nRounds: 3\nIterations: 100000\n\n=============================================\nTest/Target            Packer  BufferUnpacker\n---------------------------------------------\nnil .................. 0.0005 ........ 0.0054\nfalse ................ 0.0004 ........ 0.0059\ntrue ................. 0.0004 ........ 0.0059\n7-bit uint #1 ........ 0.0010 ........ 0.0047\n7-bit uint #2 ........ 0.0010 ........ 0.0046\n7-bit uint #3 ........ 0.0010 ........ 0.0046\n5-bit sint #1 ........ 0.0025 ........ 0.0046\n5-bit sint #2 ........ 0.0023 ........ 0.0046\n5-bit sint #3 ........ 0.0024 ........ 0.0045\n8-bit uint #1 ........ 0.0043 ........ 0.0081\n8-bit uint #2 ........ 0.0043 ........ 0.0079\n8-bit uint #3 ........ 0.0041 ........ 0.0080\n16-bit uint #1 ....... 0.0064 ........ 0.0095\n16-bit uint #2 ....... 0.0064 ........ 0.0091\n16-bit uint #3 ....... 0.0064 ........ 0.0094\n32-bit uint #1 ....... 0.0085 ........ 0.0114\n32-bit uint #2 ....... 0.0077 ........ 0.0122\n32-bit uint #3 ....... 0.0077 ........ 0.0120\n64-bit uint #1 ....... 0.0085 ........ 0.0159\n64-bit uint #2 ....... 0.0086 ........ 0.0157\n64-bit uint #3 ....... 0.0086 ........ 0.0158\n8-bit int #1 ......... 0.0042 ........ 0.0080\n8-bit int #2 ......... 0.0042 ........ 0.0080\n8-bit int #3 ......... 0.0042 ........ 0.0081\n16-bit int #1 ........ 0.0065 ........ 0.0095\n16-bit int #2 ........ 0.0065 ........ 0.0090\n16-bit int #3 ........ 0.0056 ........ 0.0085\n32-bit int #1 ........ 0.0067 ........ 0.0107\n32-bit int #2 ........ 0.0066 ........ 0.0106\n32-bit int #3 ........ 0.0063 ........ 0.0104\n64-bit int #1 ........ 0.0072 ........ 0.0162\n64-bit int #2 ........ 0.0073 ........ 0.0174\n64-bit int #3 ........ 0.0072 ........ 0.0164\n64-bit int #4 ........ 0.0077 ........ 0.0161\n64-bit float #1 ...... 0.0053 ........ 0.0135\n64-bit float #2 ...... 0.0053 ........ 0.0135\n64-bit float #3 ...... 0.0052 ........ 0.0135\nfix string #1 ....... -0.0002 ........ 0.0044\nfix string #2 ........ 0.0035 ........ 0.0067\nfix string #3 ........ 0.0035 ........ 0.0077\nfix string #4 ........ 0.0033 ........ 0.0078\n8-bit string #1 ...... 0.0059 ........ 0.0110\n8-bit string #2 ...... 0.0063 ........ 0.0121\n8-bit string #3 ...... 0.0064 ........ 0.0124\n16-bit string #1 ..... 0.0099 ........ 0.0146\n16-bit string #2 ..... 0.1522 ........ 0.1474\n32-bit string ........ 0.1511 ........ 0.1483\nwide char string #1 .. 0.0039 ........ 0.0084\nwide char string #2 .. 0.0073 ........ 0.0123\n8-bit binary #1 ...... 0.0040 ........ 0.0112\n8-bit binary #2 ...... 0.0075 ........ 0.0123\n8-bit binary #3 ...... 0.0077 ........ 0.0129\n16-bit binary ........ 0.0096 ........ 0.0145\n32-bit binary ........ 0.1535 ........ 0.1479\nfix array #1 ......... 0.0008 ........ 0.0061\nfix array #2 ......... 0.0121 ........ 0.0165\nfix array #3 ......... 0.0193 ........ 0.0222\n16-bit array #1 ...... 0.0607 ........ 0.0479\n16-bit array #2 ........... S ............. S\n32-bit array .............. S ............. S\ncomplex array ........ 0.0749 ........ 0.0824\nfix map #1 ........... 0.0329 ........ 0.0431\nfix map #2 ........... 0.0161 ........ 0.0189\nfix map #3 ........... 0.0205 ........ 0.0262\nfix map #4 ........... 0.0252 ........ 0.0205\n16-bit map #1 ........ 0.1016 ........ 0.0927\n16-bit map #2 ............. S ............. S\n32-bit map ................ S ............. S\ncomplex map .......... 0.1096 ........ 0.1030\nfixext 1 ............. 0.0157 ........ 0.0161\nfixext 2 ............. 0.0175 ........ 0.0183\nfixext 4 ............. 0.0156 ........ 0.0185\nfixext 8 ............. 0.0163 ........ 0.0184\nfixext 16 ............ 0.0164 ........ 0.0182\n8-bit ext ............ 0.0158 ........ 0.0207\n16-bit ext ........... 0.0203 ........ 0.0219\n32-bit ext ........... 0.1614 ........ 0.1539\n32-bit timestamp #1 .. 0.0195 ........ 0.0249\n32-bit timestamp #2 .. 0.0188 ........ 0.0260\n64-bit timestamp #1 .. 0.0207 ........ 0.0281\n64-bit timestamp #2 .. 0.0212 ........ 0.0291\n64-bit timestamp #3 .. 0.0207 ........ 0.0295\n96-bit timestamp #1 .. 0.0222 ........ 0.0358\n96-bit timestamp #2 .. 0.0228 ........ 0.0353\n96-bit timestamp #3 .. 0.0210 ........ 0.0319\n=============================================\nTotal                  1.6432          1.9674\nSkipped                     4               4\nFailed                      0               0\nIgnored                     0               0\n```\n\u003c/details\u003e\n\nYou may change default benchmark settings by defining the following environment \nvariables:\n\n| Name                | Default                                                                   |\n|---------------------|---------------------------------------------------------------------------|\n| MP_BENCH_TARGETS    | `pure_p,pure_u`, *see a [list](tests/bench.php#L83) of available targets* |\n| MP_BENCH_ITERATIONS | `100_000`                                                                 |\n| MP_BENCH_DURATION   | *not set*                                                                 |\n| MP_BENCH_ROUNDS     | `3`                                                                       |\n| MP_BENCH_TESTS      | `-@slow`, *see a [list](tests/DataProvider.php) of available tests*       |\n\nFor example:\n\n```sh\nexport MP_BENCH_TARGETS=pure_p\nexport MP_BENCH_ITERATIONS=1000000\nexport MP_BENCH_ROUNDS=5\n# a comma separated list of test names\nexport MP_BENCH_TESTS='complex array, complex map'\n# or a group name\n# export MP_BENCH_TESTS='-@slow' // @pecl_comp\n# or a regexp\n# export MP_BENCH_TESTS='/complex (array|map)/'\n```\n\nAnother example, benchmarking both the library and the [PECL extension](https://pecl.php.net/package/msgpack):\n\n```sh\nMP_BENCH_TARGETS=pure_p,pure_u,pecl_p,pecl_u \\\nphp -n -dextension=msgpack.so -dzend_extension=opcache.so \\\n-dpcre.jit=1 -dopcache.enable=1 -dopcache.enable_cli=1 \\\ntests/bench.php\n```\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eExample output\u003c/strong\u003e\u003c/summary\u003e\n\n```\nFilter: MessagePack\\Tests\\Perf\\Filter\\ListFilter\nRounds: 3\nIterations: 100000\n\n===========================================================================\nTest/Target            Packer  BufferUnpacker  msgpack_pack  msgpack_unpack\n---------------------------------------------------------------------------\nnil .................. 0.0031 ........ 0.0141 ...... 0.0055 ........ 0.0064\nfalse ................ 0.0039 ........ 0.0154 ...... 0.0056 ........ 0.0053\ntrue ................. 0.0038 ........ 0.0139 ...... 0.0056 ........ 0.0044\n7-bit uint #1 ........ 0.0061 ........ 0.0110 ...... 0.0059 ........ 0.0046\n7-bit uint #2 ........ 0.0065 ........ 0.0119 ...... 0.0042 ........ 0.0029\n7-bit uint #3 ........ 0.0054 ........ 0.0117 ...... 0.0045 ........ 0.0025\n5-bit sint #1 ........ 0.0047 ........ 0.0103 ...... 0.0038 ........ 0.0022\n5-bit sint #2 ........ 0.0048 ........ 0.0117 ...... 0.0038 ........ 0.0022\n5-bit sint #3 ........ 0.0046 ........ 0.0102 ...... 0.0038 ........ 0.0023\n8-bit uint #1 ........ 0.0063 ........ 0.0174 ...... 0.0039 ........ 0.0031\n8-bit uint #2 ........ 0.0063 ........ 0.0167 ...... 0.0040 ........ 0.0029\n8-bit uint #3 ........ 0.0063 ........ 0.0168 ...... 0.0039 ........ 0.0030\n16-bit uint #1 ....... 0.0092 ........ 0.0222 ...... 0.0049 ........ 0.0030\n16-bit uint #2 ....... 0.0096 ........ 0.0227 ...... 0.0042 ........ 0.0046\n16-bit uint #3 ....... 0.0123 ........ 0.0274 ...... 0.0059 ........ 0.0051\n32-bit uint #1 ....... 0.0136 ........ 0.0331 ...... 0.0060 ........ 0.0048\n32-bit uint #2 ....... 0.0130 ........ 0.0336 ...... 0.0070 ........ 0.0048\n32-bit uint #3 ....... 0.0127 ........ 0.0329 ...... 0.0051 ........ 0.0048\n64-bit uint #1 ....... 0.0126 ........ 0.0268 ...... 0.0055 ........ 0.0049\n64-bit uint #2 ....... 0.0135 ........ 0.0281 ...... 0.0052 ........ 0.0046\n64-bit uint #3 ....... 0.0131 ........ 0.0274 ...... 0.0069 ........ 0.0044\n8-bit int #1 ......... 0.0077 ........ 0.0236 ...... 0.0058 ........ 0.0044\n8-bit int #2 ......... 0.0087 ........ 0.0244 ...... 0.0058 ........ 0.0048\n8-bit int #3 ......... 0.0084 ........ 0.0241 ...... 0.0055 ........ 0.0049\n16-bit int #1 ........ 0.0112 ........ 0.0271 ...... 0.0048 ........ 0.0045\n16-bit int #2 ........ 0.0124 ........ 0.0292 ...... 0.0057 ........ 0.0049\n16-bit int #3 ........ 0.0118 ........ 0.0270 ...... 0.0058 ........ 0.0050\n32-bit int #1 ........ 0.0137 ........ 0.0366 ...... 0.0058 ........ 0.0051\n32-bit int #2 ........ 0.0133 ........ 0.0366 ...... 0.0056 ........ 0.0049\n32-bit int #3 ........ 0.0129 ........ 0.0350 ...... 0.0052 ........ 0.0048\n64-bit int #1 ........ 0.0145 ........ 0.0254 ...... 0.0034 ........ 0.0025\n64-bit int #2 ........ 0.0097 ........ 0.0214 ...... 0.0034 ........ 0.0025\n64-bit int #3 ........ 0.0096 ........ 0.0287 ...... 0.0059 ........ 0.0050\n64-bit int #4 ........ 0.0143 ........ 0.0277 ...... 0.0059 ........ 0.0046\n64-bit float #1 ...... 0.0134 ........ 0.0281 ...... 0.0057 ........ 0.0052\n64-bit float #2 ...... 0.0141 ........ 0.0281 ...... 0.0057 ........ 0.0050\n64-bit float #3 ...... 0.0144 ........ 0.0282 ...... 0.0057 ........ 0.0050\nfix string #1 ........ 0.0036 ........ 0.0143 ...... 0.0066 ........ 0.0053\nfix string #2 ........ 0.0107 ........ 0.0222 ...... 0.0065 ........ 0.0068\nfix string #3 ........ 0.0116 ........ 0.0245 ...... 0.0063 ........ 0.0069\nfix string #4 ........ 0.0105 ........ 0.0253 ...... 0.0083 ........ 0.0077\n8-bit string #1 ...... 0.0126 ........ 0.0318 ...... 0.0075 ........ 0.0088\n8-bit string #2 ...... 0.0121 ........ 0.0295 ...... 0.0076 ........ 0.0086\n8-bit string #3 ...... 0.0125 ........ 0.0293 ...... 0.0130 ........ 0.0093\n16-bit string #1 ..... 0.0159 ........ 0.0368 ...... 0.0117 ........ 0.0086\n16-bit string #2 ..... 0.1547 ........ 0.1686 ...... 0.1516 ........ 0.1373\n32-bit string ........ 0.1558 ........ 0.1729 ...... 0.1511 ........ 0.1396\nwide char string #1 .. 0.0098 ........ 0.0237 ...... 0.0066 ........ 0.0065\nwide char string #2 .. 0.0128 ........ 0.0291 ...... 0.0061 ........ 0.0082\n8-bit binary #1 ........... I ............. I ........... F ............. I\n8-bit binary #2 ........... I ............. I ........... F ............. I\n8-bit binary #3 ........... I ............. I ........... F ............. I\n16-bit binary ............. I ............. I ........... F ............. I\n32-bit binary ............. I ............. I ........... F ............. I\nfix array #1 ......... 0.0040 ........ 0.0129 ...... 0.0120 ........ 0.0058\nfix array #2 ......... 0.0279 ........ 0.0390 ...... 0.0143 ........ 0.0165\nfix array #3 ......... 0.0415 ........ 0.0463 ...... 0.0162 ........ 0.0187\n16-bit array #1 ...... 0.1349 ........ 0.1628 ...... 0.0334 ........ 0.0341\n16-bit array #2 ........... S ............. S ........... S ............. S\n32-bit array .............. S ............. S ........... S ............. S\ncomplex array ............. I ............. I ........... F ............. F\nfix map #1 ................ I ............. I ........... F ............. I\nfix map #2 ........... 0.0345 ........ 0.0391 ...... 0.0143 ........ 0.0168\nfix map #3 ................ I ............. I ........... F ............. I\nfix map #4 ........... 0.0459 ........ 0.0473 ...... 0.0151 ........ 0.0163\n16-bit map #1 ........ 0.2518 ........ 0.2962 ...... 0.0400 ........ 0.0490\n16-bit map #2 ............. S ............. S ........... S ............. S\n32-bit map ................ S ............. S ........... S ............. S\ncomplex map .......... 0.2380 ........ 0.2682 ...... 0.0545 ........ 0.0579\nfixext 1 .................. I ............. I ........... F ............. F\nfixext 2 .................. I ............. I ........... F ............. F\nfixext 4 .................. I ............. I ........... F ............. F\nfixext 8 .................. I ............. I ........... F ............. F\nfixext 16 ................. I ............. I ........... F ............. F\n8-bit ext ................. I ............. I ........... F ............. F\n16-bit ext ................ I ............. I ........... F ............. F\n32-bit ext ................ I ............. I ........... F ............. F\n32-bit timestamp #1 ....... I ............. I ........... F ............. F\n32-bit timestamp #2 ....... I ............. I ........... F ............. F\n64-bit timestamp #1 ....... I ............. I ........... F ............. F\n64-bit timestamp #2 ....... I ............. I ........... F ............. F\n64-bit timestamp #3 ....... I ............. I ........... F ............. F\n96-bit timestamp #1 ....... I ............. I ........... F ............. F\n96-bit timestamp #2 ....... I ............. I ........... F ............. F\n96-bit timestamp #3 ....... I ............. I ........... F ............. F\n===========================================================================\nTotal                  1.5625          2.3866        0.7735          0.7243\nSkipped                     4               4             4               4\nFailed                      0               0            24              17\nIgnored                    24              24             0               7\n```\n\u003c/details\u003e\n\n\n*With JIT:*\n\n```sh\nMP_BENCH_TARGETS=pure_p,pure_u,pecl_p,pecl_u \\\nphp -n -dextension=msgpack.so -dzend_extension=opcache.so \\\n-dpcre.jit=1 -dopcache.jit_buffer_size=64M -dopcache.jit=tracing -dopcache.enable=1 -dopcache.enable_cli=1 \\\ntests/bench.php\n```\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eExample output\u003c/strong\u003e\u003c/summary\u003e\n\n```\nFilter: MessagePack\\Tests\\Perf\\Filter\\ListFilter\nRounds: 3\nIterations: 100000\n\n===========================================================================\nTest/Target            Packer  BufferUnpacker  msgpack_pack  msgpack_unpack\n---------------------------------------------------------------------------\nnil .................. 0.0001 ........ 0.0052 ...... 0.0053 ........ 0.0042\nfalse ................ 0.0007 ........ 0.0060 ...... 0.0057 ........ 0.0043\ntrue ................. 0.0008 ........ 0.0060 ...... 0.0056 ........ 0.0041\n7-bit uint #1 ........ 0.0031 ........ 0.0046 ...... 0.0062 ........ 0.0041\n7-bit uint #2 ........ 0.0021 ........ 0.0043 ...... 0.0062 ........ 0.0041\n7-bit uint #3 ........ 0.0022 ........ 0.0044 ...... 0.0061 ........ 0.0040\n5-bit sint #1 ........ 0.0030 ........ 0.0048 ...... 0.0062 ........ 0.0040\n5-bit sint #2 ........ 0.0032 ........ 0.0046 ...... 0.0062 ........ 0.0040\n5-bit sint #3 ........ 0.0031 ........ 0.0046 ...... 0.0062 ........ 0.0040\n8-bit uint #1 ........ 0.0054 ........ 0.0079 ...... 0.0062 ........ 0.0050\n8-bit uint #2 ........ 0.0051 ........ 0.0079 ...... 0.0064 ........ 0.0044\n8-bit uint #3 ........ 0.0051 ........ 0.0082 ...... 0.0062 ........ 0.0044\n16-bit uint #1 ....... 0.0077 ........ 0.0094 ...... 0.0065 ........ 0.0045\n16-bit uint #2 ....... 0.0077 ........ 0.0094 ...... 0.0063 ........ 0.0045\n16-bit uint #3 ....... 0.0077 ........ 0.0095 ...... 0.0064 ........ 0.0047\n32-bit uint #1 ....... 0.0088 ........ 0.0119 ...... 0.0063 ........ 0.0043\n32-bit uint #2 ....... 0.0089 ........ 0.0117 ...... 0.0062 ........ 0.0039\n32-bit uint #3 ....... 0.0089 ........ 0.0118 ...... 0.0063 ........ 0.0044\n64-bit uint #1 ....... 0.0097 ........ 0.0155 ...... 0.0063 ........ 0.0045\n64-bit uint #2 ....... 0.0095 ........ 0.0153 ...... 0.0061 ........ 0.0045\n64-bit uint #3 ....... 0.0096 ........ 0.0156 ...... 0.0063 ........ 0.0047\n8-bit int #1 ......... 0.0053 ........ 0.0083 ...... 0.0062 ........ 0.0044\n8-bit int #2 ......... 0.0052 ........ 0.0080 ...... 0.0062 ........ 0.0044\n8-bit int #3 ......... 0.0052 ........ 0.0080 ...... 0.0062 ........ 0.0043\n16-bit int #1 ........ 0.0089 ........ 0.0097 ...... 0.0069 ........ 0.0046\n16-bit int #2 ........ 0.0075 ........ 0.0093 ...... 0.0063 ........ 0.0043\n16-bit int #3 ........ 0.0075 ........ 0.0094 ...... 0.0062 ........ 0.0046\n32-bit int #1 ........ 0.0086 ........ 0.0122 ...... 0.0063 ........ 0.0044\n32-bit int #2 ........ 0.0087 ........ 0.0120 ...... 0.0066 ........ 0.0046\n32-bit int #3 ........ 0.0086 ........ 0.0121 ...... 0.0060 ........ 0.0044\n64-bit int #1 ........ 0.0096 ........ 0.0149 ...... 0.0060 ........ 0.0045\n64-bit int #2 ........ 0.0096 ........ 0.0157 ...... 0.0062 ........ 0.0044\n64-bit int #3 ........ 0.0096 ........ 0.0160 ...... 0.0063 ........ 0.0046\n64-bit int #4 ........ 0.0097 ........ 0.0157 ...... 0.0061 ........ 0.0044\n64-bit float #1 ...... 0.0079 ........ 0.0153 ...... 0.0056 ........ 0.0044\n64-bit float #2 ...... 0.0079 ........ 0.0152 ...... 0.0057 ........ 0.0045\n64-bit float #3 ...... 0.0079 ........ 0.0155 ...... 0.0057 ........ 0.0044\nfix string #1 ........ 0.0010 ........ 0.0045 ...... 0.0071 ........ 0.0044\nfix string #2 ........ 0.0048 ........ 0.0075 ...... 0.0070 ........ 0.0060\nfix string #3 ........ 0.0048 ........ 0.0086 ...... 0.0068 ........ 0.0060\nfix string #4 ........ 0.0050 ........ 0.0088 ...... 0.0070 ........ 0.0059\n8-bit string #1 ...... 0.0081 ........ 0.0129 ...... 0.0069 ........ 0.0062\n8-bit string #2 ...... 0.0086 ........ 0.0128 ...... 0.0069 ........ 0.0065\n8-bit string #3 ...... 0.0086 ........ 0.0126 ...... 0.0115 ........ 0.0065\n16-bit string #1 ..... 0.0105 ........ 0.0137 ...... 0.0128 ........ 0.0068\n16-bit string #2 ..... 0.1510 ........ 0.1486 ...... 0.1526 ........ 0.1391\n32-bit string ........ 0.1517 ........ 0.1475 ...... 0.1504 ........ 0.1370\nwide char string #1 .. 0.0044 ........ 0.0085 ...... 0.0067 ........ 0.0057\nwide char string #2 .. 0.0081 ........ 0.0125 ...... 0.0069 ........ 0.0063\n8-bit binary #1 ........... I ............. I ........... F ............. I\n8-bit binary #2 ........... I ............. I ........... F ............. I\n8-bit binary #3 ........... I ............. I ........... F ............. I\n16-bit binary ............. I ............. I ........... F ............. I\n32-bit binary ............. I ............. I ........... F ............. I\nfix array #1 ......... 0.0014 ........ 0.0059 ...... 0.0132 ........ 0.0055\nfix array #2 ......... 0.0146 ........ 0.0156 ...... 0.0155 ........ 0.0148\nfix array #3 ......... 0.0211 ........ 0.0229 ...... 0.0179 ........ 0.0180\n16-bit array #1 ...... 0.0673 ........ 0.0498 ...... 0.0343 ........ 0.0388\n16-bit array #2 ........... S ............. S ........... S ............. S\n32-bit array .............. S ............. S ........... S ............. S\ncomplex array ............. I ............. I ........... F ............. F\nfix map #1 ................ I ............. I ........... F ............. I\nfix map #2 ........... 0.0148 ........ 0.0180 ...... 0.0156 ........ 0.0179\nfix map #3 ................ I ............. I ........... F ............. I\nfix map #4 ........... 0.0252 ........ 0.0201 ...... 0.0214 ........ 0.0167\n16-bit map #1 ........ 0.1027 ........ 0.0836 ...... 0.0388 ........ 0.0510\n16-bit map #2 ............. S ............. S ........... S ............. S\n32-bit map ................ S ............. S ........... S ............. S\ncomplex map .......... 0.1104 ........ 0.1010 ...... 0.0556 ........ 0.0602\nfixext 1 .................. I ............. I ........... F ............. F\nfixext 2 .................. I ............. I ........... F ............. F\nfixext 4 .................. I ............. I ........... F ............. F\nfixext 8 .................. I ............. I ........... F ............. F\nfixext 16 ................. I ............. I ........... F ............. F\n8-bit ext ................. I ............. I ........... F ............. F\n16-bit ext ................ I ............. I ........... F ............. F\n32-bit ext ................ I ............. I ........... F ............. F\n32-bit timestamp #1 ....... I ............. I ........... F ............. F\n32-bit timestamp #2 ....... I ............. I ........... F ............. F\n64-bit timestamp #1 ....... I ............. I ........... F ............. F\n64-bit timestamp #2 ....... I ............. I ........... F ............. F\n64-bit timestamp #3 ....... I ............. I ........... F ............. F\n96-bit timestamp #1 ....... I ............. I ........... F ............. F\n96-bit timestamp #2 ....... I ............. I ........... F ............. F\n96-bit timestamp #3 ....... I ............. I ........... F ............. F\n===========================================================================\nTotal                  0.9642          1.0909        0.8224          0.7213\nSkipped                     4               4             4               4\nFailed                      0               0            24              17\nIgnored                    24              24             0               7\n```\n\u003c/details\u003e\n\n\u003e *Note that the msgpack extension (v2.1.2) doesn't support **ext**, **bin** and UTF-8 **str** types.*\n\n\n## License\n\nThe library is released under the MIT License. See the bundled [LICENSE](LICENSE) file for details.\n","funding_links":["https://github.com/sponsors/rybakit"],"categories":["PHP","目录","Table of Contents","PHP相关软件/工具"],"sub_categories":["数据结构和存储 Data Structure and Storage","Data Structure and Storage","PRC"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frybakit%2Fmsgpack.php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frybakit%2Fmsgpack.php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frybakit%2Fmsgpack.php/lists"}