A pure PHP implementation of the MessagePack serialization format / msgpack.org[PHP]

Overview

msgpack.php

Quality Assurance Code Coverage Mentioned in Awesome PHP

A pure PHP implementation of the MessagePack serialization format.

Features

Table of contents

Installation

The recommended way to install the library is through Composer:

composer require rybakit/msgpack

Usage

Packing

To pack values you can either use an instance of a Packer:

use MessagePack\Packer;

$packer = new Packer();

...

$packed = $packer->pack($value);

or call a static method on the MessagePack class:

use MessagePack\MessagePack;

...

$packed = MessagePack::pack($value);

In the examples above, the method pack automatically packs a value depending on its type. However, not all PHP types can be uniquely translated to MessagePack types. For example, the MessagePack format defines map and array types, which are represented by a single array type in PHP. By default, the packer will pack a PHP array as a MessagePack array if it has sequential numeric keys, starting from 0 and as a MessagePack map otherwise:

$mpArr1 = $packer->pack([1, 2]);               // MP array [1, 2]
$mpArr2 = $packer->pack([0 => 1, 1 => 2]);     // MP array [1, 2]
$mpMap1 = $packer->pack([0 => 1, 2 => 3]);     // MP map {0: 1, 2: 3}
$mpMap2 = $packer->pack([1 => 2, 2 => 3]);     // MP map {1: 2, 2: 3}
$mpMap3 = $packer->pack(['a' => 1, 'b' => 2]); // MP map {a: 1, b: 2}

However, sometimes you need to pack a sequential array as a MessagePack map. To do this, use the packMap method:

$mpMap = $packer->packMap([1, 2]); // {0: 1, 1: 2}

Here is a list of type-specific packing methods:

$packer->packNil();           // MP nil
$packer->packBool(true);      // MP bool
$packer->packInt(42);         // MP int
$packer->packFloat(M_PI);     // MP float (32 or 64)
$packer->packFloat32(M_PI);   // MP float 32
$packer->packFloat64(M_PI);   // MP float 64
$packer->packStr('foo');      // MP str
$packer->packBin("\x80");     // MP bin
$packer->packArray([1, 2]);   // MP array
$packer->packMap(['a' => 1]); // MP map
$packer->packExt(1, "\xaa");  // MP ext

Check the "Custom types" section below on how to pack custom types.

Packing options

The Packer object supports a number of bitmask-based options for fine-tuning the packing process (defaults are in bold):

Name Description
FORCE_STR Forces PHP strings to be packed as MessagePack UTF-8 strings
FORCE_BIN Forces PHP strings to be packed as MessagePack binary data
DETECT_STR_BIN Detects MessagePack str/bin type automatically
FORCE_ARR Forces PHP arrays to be packed as MessagePack arrays
FORCE_MAP Forces PHP arrays to be packed as MessagePack maps
DETECT_ARR_MAP Detects MessagePack array/map type automatically
FORCE_FLOAT32 Forces PHP floats to be packed as 32-bits MessagePack floats
FORCE_FLOAT64 Forces PHP floats to be packed as 64-bits MessagePack floats

The type detection mode (DETECT_STR_BIN/DETECT_ARR_MAP) adds some overhead which can be noticed when you pack large (16- and 32-bit) arrays or strings. However, if you know the value type in advance (for example, you only work with UTF-8 strings or/and associative arrays), you can eliminate this overhead by forcing the packer to use the appropriate type, which will save it from running the auto-detection routine. Another option is to explicitly specify the value type. The library provides 2 auxiliary classes for this, Map and Bin. Check the "Custom types" section below for details.

Examples:

use MessagePack\Packer;
use MessagePack\PackOptions;

// detect str/bin type and pack PHP 64-bit floats (doubles) to MP 32-bit floats
$packer = new Packer(PackOptions::DETECT_STR_BIN | PackOptions::FORCE_FLOAT32);

// these will throw MessagePack\Exception\InvalidOptionException
$packer = new Packer(PackOptions::FORCE_STR | PackOptions::FORCE_BIN);
$packer = new Packer(PackOptions::FORCE_FLOAT32 | PackOptions::FORCE_FLOAT64);

Unpacking

To unpack data you can either use an instance of a BufferUnpacker:

use MessagePack\BufferUnpacker;

$unpacker = new BufferUnpacker();

...

$unpacker->reset($packed);
$value = $unpacker->unpack();

or call a static method on the MessagePack class:

use MessagePack\MessagePack;

...

$value = MessagePack::unpack($packed);

If the packed data is received in chunks (e.g. when reading from a stream), use the tryUnpack method, which attempts to unpack data and returns an array of unpacked messages (if any) instead of throwing an InsufficientDataException:

while ($chunk = ...) {
    $unpacker->append($chunk);
    if ($messages = $unpacker->tryUnpack()) {
        return $messages;
    }
}

If you want to unpack from a specific position in a buffer, use seek:

$unpacker->seek(42); // set position equal to 42 bytes
$unpacker->seek(-8); // set position to 8 bytes before the end of the buffer

To skip bytes from the current position, use skip:

$unpacker->skip(10); // set position to 10 bytes ahead of the current position

To get the number of remaining (unread) bytes in the buffer:

$unreadBytesCount = $unpacker->getRemainingCount();

To check whether the buffer has unread data:

$hasUnreadBytes = $unpacker->hasRemaining();

If needed, you can remove already read data from the buffer by calling:

$releasedBytesCount = $unpacker->release();

With the read method you can read raw (packed) data:

$packedData = $unpacker->read(2); // read 2 bytes

Besides the above methods BufferUnpacker provides type-specific unpacking methods, namely:

$unpacker->unpackNil();   // PHP null
$unpacker->unpackBool();  // PHP bool
$unpacker->unpackInt();   // PHP int
$unpacker->unpackFloat(); // PHP float
$unpacker->unpackStr();   // PHP UTF-8 string
$unpacker->unpackBin();   // PHP binary string
$unpacker->unpackArray(); // PHP sequential array
$unpacker->unpackMap();   // PHP associative array
$unpacker->unpackExt();   // PHP MessagePack\Type\Ext object

Unpacking options

The BufferUnpacker object supports a number of bitmask-based options for fine-tuning the unpacking process (defaults are in bold):

Name Description
BIGINT_AS_STR Converts overflowed integers to strings [1]
BIGINT_AS_GMP Converts overflowed integers to GMP objects [2]
BIGINT_AS_DEC Converts overflowed integers to Decimal\Decimal objects [3]

1. The binary MessagePack format has unsigned 64-bit as its largest integer data type, but PHP does not support such integers, which means that an overflow can occur during unpacking.

2. Make sure the GMP extension is enabled.

3. Make sure the Decimal extension is enabled.

Examples:

use MessagePack\BufferUnpacker;
use MessagePack\UnpackOptions;

$packedUint64 = "\xcf"."\xff\xff\xff\xff"."\xff\xff\xff\xff";

$unpacker = new BufferUnpacker($packedUint64);
var_dump($unpacker->unpack()); // string(20) "18446744073709551615"

$unpacker = new BufferUnpacker($packedUint64, UnpackOptions::BIGINT_AS_GMP);
var_dump($unpacker->unpack()); // object(GMP) {...}

$unpacker = new BufferUnpacker($packedUint64, UnpackOptions::BIGINT_AS_DEC);
var_dump($unpacker->unpack()); // object(Decimal\Decimal) {...}

Custom types

In addition to the basic types, the library provides functionality to serialize and deserialize arbitrary types. This can be done in several ways, depending on your use case. Let's take a look at them.

Type objects

If you need to serialize an instance of one of your classes, the best way to do it is to implement the CanBePacked interface in the class. A good example of such a class is the Map type class that comes with the library. This type is useful when you want to explicitly specify that a given PHP array should be packed as a MessagePack map without triggering an automatic type detection routine:

use MessagePack\Packer;
use MessagePack\Type\Map;

$packer = new Packer();

$packedMap = $packer->pack(new Map([1, 2, 3]));
$packedArray = $packer->pack([1, 2, 3]);

More type examples can be found in the src/Type directory.

Type transformers

As with type objects, type transformers are only responsible for serializing values. They should be used when you need to serialize a value that does not implement the CanBePacked interface. Examples of such values could be instances of built-in or third-party classes that you don't own, or non-objects such as resources.

A transformer class must implement the CanPack interface. To use a transformer, it must first be registered in the packer. Here is an example of how to serialize PHP streams into the MessagePack bin format type using one of the supplied transformers, StreamTransformer:

use MessagePack\Packer;
use MessagePack\TypeTransformer\StreamTransformer;

$packer = new Packer(null, [new StreamTransformer()]);

$packedBin = $packer->pack(fopen('/path/to/file', 'r+'));

More type transformer examples can be found in the src/TypeTransformer directory.

Extensions

In contrast to the cases described above, extensions are intended to handle extension types and are responsible for serializing and deserializing values. An extension class must implement the Extension interface.

For example, to make the built-in PHP DateTime objects first-class citizens in your code, you can create a corresponding extension, as shown in the example. Register the extension for both the packer and the unpacker with a unique extension type (an integer from 0 to 127) and you're ready to go:

use App\MessagePack\DateTimeExtension;
use MessagePack\BufferUnpacker;
use MessagePack\Packer;

$dateTimeExtension = new DateTimeExtension(42);

$packer = new Packer();
$packer = $packer->extendWith($dateTimeExtension);

$unpacker = new BufferUnpacker();
$unpacker = $unpacker->extendWith($dateTimeExtension);

$packedDate = $packer->pack(new DateTimeImmutable());
$originalDate = $unpacker->reset($packedDate)->unpack();

If you unpack a value from an extension that is not known to the unpacker, an Ext object will be returned. It can also be used to pack an extension:

use MessagePack\MessagePack;
use MessagePack\Type\Ext;

$packed = MessagePack::pack(new Ext(42, "\xaa"));
$ext = MessagePack::unpack($packed);

assert($ext->type === 42);
assert($ext->data === "\xaa");

More extension examples can be found in the examples/MessagePack directory.

To learn more about how extension types can be useful, check out this article.

Exceptions

If an error occurs during packing/unpacking, a PackingFailedException or an UnpackingFailedException will be thrown, respectively. In addition, an InsufficientDataException can be thrown during unpacking.

An InvalidOptionException will be thrown in case an invalid option (or a combination of mutually exclusive options) is used.

Tests

Run tests as follows:

vendor/bin/phpunit

Also, if you already have Docker installed, you can run the tests in a docker container. First, create a container:

./dockerfile.sh | docker build -t msgpack -

The command above will create a container named msgpack with PHP 8.0 runtime. You may change the default runtime by defining the PHP_IMAGE environment variable:

PHP_IMAGE='php:7.4-cli' ./dockerfile.sh | docker build -t msgpack -

See a list of various images here.

Then run the unit tests:

docker run --rm -v $PWD:/msgpack -w /msgpack msgpack

Fuzzing

To ensure that the unpacking works correctly with malformed/semi-malformed data, you can use a testing technique called Fuzzing. The library ships with a help file (target) for PHP-Fuzzer and can be used as follows:

php-fuzzer fuzz tests/fuzz_buffer_unpacker.php

Performance

To check performance, run:

php -n -dzend_extension=opcache.so \
-dpcre.jit=1 -dopcache.enable=1 -dopcache.enable_cli=1 \
tests/bench.php
Example output
Filter: MessagePack\Tests\Perf\Filter\ListFilter
Rounds: 3
Iterations: 100000

=============================================
Test/Target            Packer  BufferUnpacker
---------------------------------------------
nil .................. 0.0017 ........ 0.0138
false ................ 0.0033 ........ 0.0131
true ................. 0.0026 ........ 0.0136
7-bit uint #1 ........ 0.0079 ........ 0.0125
7-bit uint #2 ........ 0.0077 ........ 0.0126
7-bit uint #3 ........ 0.0066 ........ 0.0128
5-bit sint #1 ........ 0.0080 ........ 0.0140
5-bit sint #2 ........ 0.0074 ........ 0.0134
5-bit sint #3 ........ 0.0074 ........ 0.0183
8-bit uint #1 ........ 0.0085 ........ 0.0211
8-bit uint #2 ........ 0.0092 ........ 0.0226
8-bit uint #3 ........ 0.0085 ........ 0.0208
16-bit uint #1 ....... 0.0170 ........ 0.0245
16-bit uint #2 ....... 0.0130 ........ 0.0250
16-bit uint #3 ....... 0.0130 ........ 0.0249
32-bit uint #1 ....... 0.0132 ........ 0.0341
32-bit uint #2 ....... 0.0124 ........ 0.0343
32-bit uint #3 ....... 0.0142 ........ 0.0323
64-bit uint #1 ....... 0.0137 ........ 0.0314
64-bit uint #2 ....... 0.0129 ........ 0.0309
64-bit uint #3 ....... 0.0153 ........ 0.0320
8-bit int #1 ......... 0.0104 ........ 0.0217
8-bit int #2 ......... 0.0108 ........ 0.0236
8-bit int #3 ......... 0.0088 ........ 0.0244
16-bit int #1 ........ 0.0135 ........ 0.0245
16-bit int #2 ........ 0.0134 ........ 0.0254
16-bit int #3 ........ 0.0139 ........ 0.0252
32-bit int #1 ........ 0.0133 ........ 0.0329
32-bit int #2 ........ 0.0154 ........ 0.0364
32-bit int #3 ........ 0.0131 ........ 0.0330
64-bit int #1 ........ 0.0141 ........ 0.0312
64-bit int #2 ........ 0.0137 ........ 0.0345
64-bit int #3 ........ 0.0128 ........ 0.0335
64-bit int #4 ........ 0.0141 ........ 0.0313
64-bit float #1 ...... 0.0148 ........ 0.0300
64-bit float #2 ...... 0.0147 ........ 0.0308
64-bit float #3 ...... 0.0145 ........ 0.0302
fix string #1 ....... -0.0032 ........ 0.0127
fix string #2 ........ 0.0102 ........ 0.0250
fix string #3 ........ 0.0132 ........ 0.0240
fix string #4 ........ 0.0122 ........ 0.0243
8-bit string #1 ...... 0.0121 ........ 0.0316
8-bit string #2 ...... 0.0128 ........ 0.0325
8-bit string #3 ...... 0.0146 ........ 0.0312
16-bit string #1 ..... 0.0185 ........ 0.0353
16-bit string #2 ..... 0.1541 ........ 0.1720
32-bit string ........ 0.1541 ........ 0.1801
wide char string #1 .. 0.0110 ........ 0.0260
wide char string #2 .. 0.0127 ........ 0.0334
8-bit binary #1 ...... 0.0107 ........ 0.0293
8-bit binary #2 ...... 0.0121 ........ 0.0304
8-bit binary #3 ...... 0.0131 ........ 0.0305
16-bit binary ........ 0.0159 ........ 0.0355
32-bit binary ........ 0.1564 ........ 0.1825
fix array #1 ......... 0.0025 ........ 0.0128
fix array #2 ......... 0.0296 ........ 0.0354
fix array #3 ......... 0.0436 ........ 0.0505
16-bit array #1 ...... 0.1416 ........ 0.1621
16-bit array #2 ........... S ............. S
32-bit array .............. S ............. S
complex array ........ 0.1695 ........ 0.2323
fix map #1 ........... 0.0776 ........ 0.1083
fix map #2 ........... 0.0368 ........ 0.0419
fix map #3 ........... 0.0407 ........ 0.0603
fix map #4 ........... 0.0454 ........ 0.0527
16-bit map #1 ........ 0.2320 ........ 0.3022
16-bit map #2 ............. S ............. S
32-bit map ................ S ............. S
complex map .......... 0.2327 ........ 0.2729
fixext 1 ............. 0.0156 ........ 0.0371
fixext 2 ............. 0.0154 ........ 0.0360
fixext 4 ............. 0.0185 ........ 0.0358
fixext 8 ............. 0.0150 ........ 0.0361
fixext 16 ............ 0.0183 ........ 0.0361
8-bit ext ............ 0.0189 ........ 0.0433
16-bit ext ........... 0.0208 ........ 0.0467
32-bit ext ........... 0.1595 ........ 0.1927
=============================================
Total                  2.3793          3.6580
Skipped                     4               4
Failed                      0               0
Ignored                     0               0

With JIT:

php -n -dzend_extension=opcache.so \
-dpcre.jit=1 -dopcache.jit_buffer_size=64M -dopcache.jit=tracing -dopcache.enable=1 -dopcache.enable_cli=1 \
tests/bench.php
Example output
Filter: MessagePack\Tests\Perf\Filter\ListFilter
Rounds: 3
Iterations: 100000

=============================================
Test/Target            Packer  BufferUnpacker
---------------------------------------------
nil .................. 0.0002 ........ 0.0058
false ................ 0.0012 ........ 0.0072
true ................. 0.0013 ........ 0.0075
7-bit uint #1 ........ 0.0027 ........ 0.0067
7-bit uint #2 ........ 0.0028 ........ 0.0066
7-bit uint #3 ........ 0.0029 ........ 0.0068
5-bit sint #1 ........ 0.0039 ........ 0.0098
5-bit sint #2 ........ 0.0036 ........ 0.0067
5-bit sint #3 ........ 0.0065 ........ 0.0071
8-bit uint #1 ........ 0.0068 ........ 0.0100
8-bit uint #2 ........ 0.0066 ........ 0.0100
8-bit uint #3 ........ 0.0062 ........ 0.0099
16-bit uint #1 ....... 0.0096 ........ 0.0119
16-bit uint #2 ....... 0.0097 ........ 0.0117
16-bit uint #3 ....... 0.0096 ........ 0.0116
32-bit uint #1 ....... 0.0105 ........ 0.0155
32-bit uint #2 ....... 0.0136 ........ 0.0148
32-bit uint #3 ....... 0.0106 ........ 0.0148
64-bit uint #1 ....... 0.0111 ........ 0.0232
64-bit uint #2 ....... 0.0111 ........ 0.0231
64-bit uint #3 ....... 0.0109 ........ 0.0231
8-bit int #1 ......... 0.0103 ........ 0.0108
8-bit int #2 ......... 0.0067 ........ 0.0106
8-bit int #3 ......... 0.0067 ........ 0.0106
16-bit int #1 ........ 0.0095 ........ 0.0118
16-bit int #2 ........ 0.0136 ........ 0.0116
16-bit int #3 ........ 0.0097 ........ 0.0159
32-bit int #1 ........ 0.0107 ........ 0.0153
32-bit int #2 ........ 0.0105 ........ 0.0152
32-bit int #3 ........ 0.0106 ........ 0.0151
64-bit int #1 ........ 0.0111 ........ 0.0236
64-bit int #2 ........ 0.0154 ........ 0.0235
64-bit int #3 ........ 0.0153 ........ 0.0236
64-bit int #4 ........ 0.0111 ........ 0.0292
64-bit float #1 ...... 0.0146 ........ 0.0230
64-bit float #2 ...... 0.0104 ........ 0.0228
64-bit float #3 ...... 0.0104 ........ 0.0228
fix string #1 ........ 0.0016 ........ 0.0066
fix string #2 ........ 0.0066 ........ 0.0147
fix string #3 ........ 0.0066 ........ 0.0167
fix string #4 ........ 0.0063 ........ 0.0119
8-bit string #1 ...... 0.0143 ........ 0.0163
8-bit string #2 ...... 0.0103 ........ 0.0212
8-bit string #3 ...... 0.0106 ........ 0.0161
16-bit string #1 ..... 0.0138 ........ 0.0237
16-bit string #2 ..... 0.1612 ........ 0.1572
32-bit string ........ 0.1549 ........ 0.1693
wide char string #1 .. 0.0064 ........ 0.0164
wide char string #2 .. 0.0098 ........ 0.0162
8-bit binary #1 ...... 0.0097 ........ 0.0143
8-bit binary #2 ...... 0.0101 ........ 0.0161
8-bit binary #3 ...... 0.0104 ........ 0.0212
16-bit binary ........ 0.0137 ........ 0.0184
32-bit binary ........ 0.1549 ........ 0.1589
fix array #1 ......... 0.0014 ........ 0.0072
fix array #2 ......... 0.0173 ........ 0.0205
fix array #3 ......... 0.0257 ........ 0.0288
16-bit array #1 ...... 0.0713 ........ 0.0561
16-bit array #2 ........... S ............. S
32-bit array .............. S ............. S
complex array ........ 0.0831 ........ 0.0896
fix map #1 ........... 0.0385 ........ 0.0490
fix map #2 ........... 0.0204 ........ 0.0254
fix map #3 ........... 0.0255 ........ 0.0313
fix map #4 ........... 0.0294 ........ 0.0300
16-bit map #1 ........ 0.0956 ........ 0.1025
16-bit map #2 ............. S ............. S
32-bit map ................ S ............. S
complex map .......... 0.1161 ........ 0.1267
fixext 1 ............. 0.0157 ........ 0.0304
fixext 2 ............. 0.0121 ........ 0.0232
fixext 4 ............. 0.0117 ........ 0.0229
fixext 8 ............. 0.0118 ........ 0.0233
fixext 16 ............ 0.0114 ........ 0.0245
8-bit ext ............ 0.0130 ........ 0.0266
16-bit ext ........... 0.0162 ........ 0.0275
32-bit ext ........... 0.1561 ........ 0.1665
=============================================
Total                  1.6916          2.1562
Skipped                     4               4
Failed                      0               0
Ignored                     0               0

You may change default benchmark settings by defining the following environment variables:

Name Default
MP_BENCH_TARGETS pure_p,pure_u, see a list of available targets
MP_BENCH_ITERATIONS 100_000
MP_BENCH_DURATION not set
MP_BENCH_ROUNDS 3
MP_BENCH_TESTS -@slow, see a list of available tests

For example:

export MP_BENCH_TARGETS=pure_p
export MP_BENCH_ITERATIONS=1000000
export MP_BENCH_ROUNDS=5
# a comma separated list of test names
export MP_BENCH_TESTS='complex array, complex map'
# or a group name
# export MP_BENCH_TESTS='-@slow' // @pecl_comp
# or a regexp
# export MP_BENCH_TESTS='/complex (array|map)/'

Another example, benchmarking both the library and the PECL extension:

MP_BENCH_TARGETS=pure_p,pure_u,pecl_p,pecl_u \
php -n -dextension=msgpack.so -dzend_extension=opcache.so \
-dpcre.jit=1 -dopcache.enable=1 -dopcache.enable_cli=1 \
tests/bench.php
Example output
Filter: MessagePack\Tests\Perf\Filter\ListFilter
Rounds: 3
Iterations: 100000

===========================================================================
Test/Target            Packer  BufferUnpacker  msgpack_pack  msgpack_unpack
---------------------------------------------------------------------------
nil .................. 0.0025 ........ 0.0129 ...... 0.0037 ........ 0.0015
false ................ 0.0028 ........ 0.0132 ...... 0.0037 ........ 0.0024
true ................. 0.0030 ........ 0.0133 ...... 0.0044 ........ 0.0042
7-bit uint #1 ........ 0.0066 ........ 0.0127 ...... 0.0042 ........ 0.0024
7-bit uint #2 ........ 0.0062 ........ 0.0120 ...... 0.0045 ........ 0.0020
7-bit uint #3 ........ 0.0066 ........ 0.0125 ...... 0.0040 ........ 0.0022
5-bit sint #1 ........ 0.0067 ........ 0.0135 ...... 0.0050 ........ 0.0025
5-bit sint #2 ........ 0.0062 ........ 0.0133 ...... 0.0040 ........ 0.0016
5-bit sint #3 ........ 0.0067 ........ 0.0128 ...... 0.0044 ........ 0.0027
8-bit uint #1 ........ 0.0088 ........ 0.0229 ...... 0.0068 ........ 0.0027
8-bit uint #2 ........ 0.0093 ........ 0.0207 ...... 0.0062 ........ 0.0033
8-bit uint #3 ........ 0.0093 ........ 0.0204 ...... 0.0043 ........ 0.0028
16-bit uint #1 ....... 0.0120 ........ 0.0253 ...... 0.0050 ........ 0.0030
16-bit uint #2 ....... 0.0131 ........ 0.0242 ...... 0.0053 ........ 0.0034
16-bit uint #3 ....... 0.0131 ........ 0.0243 ...... 0.0053 ........ 0.0033
32-bit uint #1 ....... 0.0126 ........ 0.0332 ...... 0.0043 ........ 0.0024
32-bit uint #2 ....... 0.0121 ........ 0.0333 ...... 0.0041 ........ 0.0030
32-bit uint #3 ....... 0.0130 ........ 0.0327 ...... 0.0040 ........ 0.0029
64-bit uint #1 ....... 0.0138 ........ 0.0314 ...... 0.0040 ........ 0.0033
64-bit uint #2 ....... 0.0153 ........ 0.0303 ...... 0.0042 ........ 0.0047
64-bit uint #3 ....... 0.0132 ........ 0.0326 ...... 0.0054 ........ 0.0039
8-bit int #1 ......... 0.0118 ........ 0.0216 ...... 0.0036 ........ 0.0024
8-bit int #2 ......... 0.0093 ........ 0.0214 ...... 0.0037 ........ 0.0036
8-bit int #3 ......... 0.0084 ........ 0.0201 ...... 0.0062 ........ 0.0025
16-bit int #1 ........ 0.0137 ........ 0.0262 ...... 0.0036 ........ 0.0040
16-bit int #2 ........ 0.0151 ........ 0.0246 ...... 0.0059 ........ 0.0031
16-bit int #3 ........ 0.0132 ........ 0.0281 ...... 0.0045 ........ 0.0028
32-bit int #1 ........ 0.0151 ........ 0.0378 ...... 0.0050 ........ 0.0039
32-bit int #2 ........ 0.0137 ........ 0.0356 ...... 0.0040 ........ 0.0031
32-bit int #3 ........ 0.0134 ........ 0.0335 ...... 0.0048 ........ 0.0020
64-bit int #1 ........ 0.0135 ........ 0.0313 ...... 0.0043 ........ 0.0026
64-bit int #2 ........ 0.0135 ........ 0.0301 ...... 0.0043 ........ 0.0029
64-bit int #3 ........ 0.0131 ........ 0.0312 ...... 0.0046 ........ 0.0030
64-bit int #4 ........ 0.0160 ........ 0.0330 ...... 0.0044 ........ 0.0028
64-bit float #1 ...... 0.0147 ........ 0.0295 ...... 0.0051 ........ 0.0047
64-bit float #2 ...... 0.0145 ........ 0.0313 ...... 0.0040 ........ 0.0025
64-bit float #3 ...... 0.0142 ........ 0.0301 ...... 0.0042 ........ 0.0026
fix string #1 ........ 0.0027 ........ 0.0134 ...... 0.0052 ........ 0.0025
fix string #2 ........ 0.0108 ........ 0.0251 ...... 0.0054 ........ 0.0049
fix string #3 ........ 0.0106 ........ 0.0232 ...... 0.0053 ........ 0.0044
fix string #4 ........ 0.0108 ........ 0.0232 ...... 0.0066 ........ 0.0051
8-bit string #1 ...... 0.0125 ........ 0.0330 ...... 0.0055 ........ 0.0046
8-bit string #2 ...... 0.0124 ........ 0.0304 ...... 0.0047 ........ 0.0051
8-bit string #3 ...... 0.0106 ........ 0.0314 ...... 0.0097 ........ 0.0045
16-bit string #1 ..... 0.0162 ........ 0.0356 ...... 0.0103 ........ 0.0041
16-bit string #2 ..... 0.1552 ........ 0.1797 ...... 0.1457 ........ 0.1418
32-bit string ........ 0.1559 ........ 0.1813 ...... 0.1467 ........ 0.1425
wide char string #1 .. 0.0100 ........ 0.0236 ...... 0.0053 ........ 0.0041
wide char string #2 .. 0.0124 ........ 0.0303 ...... 0.0053 ........ 0.0061
8-bit binary #1 ........... I ............. I ........... F ............. I
8-bit binary #2 ........... I ............. I ........... F ............. I
8-bit binary #3 ........... I ............. I ........... F ............. I
16-bit binary ............. I ............. I ........... F ............. I
32-bit binary ............. I ............. I ........... F ............. I
fix array #1 ......... 0.0040 ........ 0.0134 ...... 0.0141 ........ 0.0034
fix array #2 ......... 0.0292 ........ 0.0347 ...... 0.0149 ........ 0.0133
fix array #3 ......... 0.0443 ........ 0.0494 ...... 0.0169 ........ 0.0164
16-bit array #1 ...... 0.1390 ........ 0.1634 ...... 0.0290 ........ 0.0325
16-bit array #2 ........... S ............. S ........... S ............. S
32-bit array .............. S ............. S ........... S ............. S
complex array ............. I ............. I ........... F ............. F
fix map #1 ................ I ............. I ........... F ............. I
fix map #2 ........... 0.0336 ........ 0.0407 ...... 0.0180 ........ 0.0159
fix map #3 ................ I ............. I ........... F ............. I
fix map #4 ........... 0.0455 ........ 0.0489 ...... 0.0163 ........ 0.0165
16-bit map #1 ........ 0.2265 ........ 0.3023 ...... 0.0320 ........ 0.0439
16-bit map #2 ............. S ............. S ........... S ............. S
32-bit map ................ S ............. S ........... S ............. S
complex map .......... 0.2354 ........ 0.2730 ...... 0.0532 ........ 0.0520
fixext 1 .................. I ............. I ........... F ............. F
fixext 2 .................. I ............. I ........... F ............. F
fixext 4 .................. I ............. I ........... F ............. F
fixext 8 .................. I ............. I ........... F ............. F
fixext 16 ................. I ............. I ........... F ............. F
8-bit ext ................. I ............. I ........... F ............. F
16-bit ext ................ I ............. I ........... F ............. F
32-bit ext ................ I ............. I ........... F ............. F
===========================================================================
Total                  1.5836          2.4687        0.7192          0.6321
Skipped                     4               4             4               4
Failed                      0               0            16               9
Ignored                    16              16             0               7

With JIT:

MP_BENCH_TARGETS=pure_p,pure_u,pecl_p,pecl_u \
php -n -dextension=msgpack.so -dzend_extension=opcache.so \
-dpcre.jit=1 -dopcache.jit_buffer_size=64M -dopcache.jit=tracing -dopcache.enable=1 -dopcache.enable_cli=1 \
tests/bench.php
Example output
Filter: MessagePack\Tests\Perf\Filter\ListFilter
Rounds: 3
Iterations: 100000

===========================================================================
Test/Target            Packer  BufferUnpacker  msgpack_pack  msgpack_unpack
---------------------------------------------------------------------------
nil .................. 0.0003 ........ 0.0061 ...... 0.0064 ........ 0.0047
false ................ 0.0015 ........ 0.0070 ...... 0.0065 ........ 0.0047
true ................. 0.0017 ........ 0.0072 ...... 0.0107 ........ 0.0050
7-bit uint #1 ........ 0.0032 ........ 0.0065 ...... 0.0080 ........ 0.0044
7-bit uint #2 ........ 0.0033 ........ 0.0064 ...... 0.0082 ........ 0.0044
7-bit uint #3 ........ 0.0034 ........ 0.0063 ...... 0.0079 ........ 0.0045
5-bit sint #1 ........ 0.0047 ........ 0.0067 ...... 0.0081 ........ 0.0076
5-bit sint #2 ........ 0.0045 ........ 0.0068 ...... 0.0152 ........ 0.0047
5-bit sint #3 ........ 0.0044 ........ 0.0068 ...... 0.0080 ........ 0.0046
8-bit uint #1 ........ 0.0075 ........ 0.0096 ...... 0.0082 ........ 0.0051
8-bit uint #2 ........ 0.0078 ........ 0.0098 ...... 0.0080 ........ 0.0082
8-bit uint #3 ........ 0.0076 ........ 0.0096 ...... 0.0108 ........ 0.0051
16-bit uint #1 ....... 0.0109 ........ 0.0121 ...... 0.0081 ........ 0.0053
16-bit uint #2 ....... 0.0106 ........ 0.0160 ...... 0.0101 ........ 0.0050
16-bit uint #3 ....... 0.0109 ........ 0.0118 ...... 0.0081 ........ 0.0050
32-bit uint #1 ....... 0.0112 ........ 0.0153 ...... 0.0081 ........ 0.0050
32-bit uint #2 ....... 0.0111 ........ 0.0150 ...... 0.0081 ........ 0.0049
32-bit uint #3 ....... 0.0113 ........ 0.0151 ...... 0.0080 ........ 0.0049
64-bit uint #1 ....... 0.0116 ........ 0.0233 ...... 0.0082 ........ 0.0051
64-bit uint #2 ....... 0.0160 ........ 0.0234 ...... 0.0079 ........ 0.0054
64-bit uint #3 ....... 0.0116 ........ 0.0234 ...... 0.0080 ........ 0.0052
8-bit int #1 ......... 0.0076 ........ 0.0107 ...... 0.0081 ........ 0.0085
8-bit int #2 ......... 0.0077 ........ 0.0100 ...... 0.0155 ........ 0.0054
8-bit int #3 ......... 0.0077 ........ 0.0107 ...... 0.0079 ........ 0.0081
16-bit int #1 ........ 0.0105 ........ 0.0119 ...... 0.0082 ........ 0.0050
16-bit int #2 ........ 0.0103 ........ 0.0118 ...... 0.0081 ........ 0.0080
16-bit int #3 ........ 0.0108 ........ 0.0118 ...... 0.0108 ........ 0.0050
32-bit int #1 ........ 0.0112 ........ 0.0205 ...... 0.0116 ........ 0.0052
32-bit int #2 ........ 0.0109 ........ 0.0153 ...... 0.0078 ........ 0.0050
32-bit int #3 ........ 0.0112 ........ 0.0154 ...... 0.0082 ........ 0.0078
64-bit int #1 ........ 0.0118 ........ 0.0235 ...... 0.0153 ........ 0.0052
64-bit int #2 ........ 0.0117 ........ 0.0237 ...... 0.0080 ........ 0.0048
64-bit int #3 ........ 0.0117 ........ 0.0238 ...... 0.0080 ........ 0.0050
64-bit int #4 ........ 0.0119 ........ 0.0235 ...... 0.0082 ........ 0.0046
64-bit float #1 ...... 0.0108 ........ 0.0286 ...... 0.0145 ........ 0.0052
64-bit float #2 ...... 0.0107 ........ 0.0230 ...... 0.0076 ........ 0.0051
64-bit float #3 ...... 0.0108 ........ 0.0218 ...... 0.0076 ........ 0.0051
fix string #1 ........ 0.0019 ........ 0.0068 ...... 0.0084 ........ 0.0051
fix string #2 ........ 0.0070 ........ 0.0108 ...... 0.0085 ........ 0.0069
fix string #3 ........ 0.0071 ........ 0.0122 ...... 0.0088 ........ 0.0069
fix string #4 ........ 0.0106 ........ 0.0120 ...... 0.0084 ........ 0.0066
8-bit string #1 ...... 0.0104 ........ 0.0208 ...... 0.0122 ........ 0.0074
8-bit string #2 ...... 0.0108 ........ 0.0159 ...... 0.0086 ........ 0.0070
8-bit string #3 ...... 0.0111 ........ 0.0162 ...... 0.0165 ........ 0.0073
16-bit string #1 ..... 0.0141 ........ 0.0181 ...... 0.0144 ........ 0.0090
16-bit string #2 ..... 0.1550 ........ 0.1644 ...... 0.1534 ........ 0.1488
32-bit string ........ 0.1547 ........ 0.1591 ...... 0.1572 ........ 0.1561
wide char string #1 .. 0.0070 ........ 0.0118 ...... 0.0084 ........ 0.0070
wide char string #2 .. 0.0106 ........ 0.0161 ...... 0.0089 ........ 0.0112
8-bit binary #1 ........... I ............. I ........... F ............. I
8-bit binary #2 ........... I ............. I ........... F ............. I
8-bit binary #3 ........... I ............. I ........... F ............. I
16-bit binary ............. I ............. I ........... F ............. I
32-bit binary ............. I ............. I ........... F ............. I
fix array #1 ......... 0.0024 ........ 0.0075 ...... 0.0163 ........ 0.0063
fix array #2 ......... 0.0179 ........ 0.0198 ...... 0.0192 ........ 0.0176
fix array #3 ......... 0.0261 ........ 0.0340 ...... 0.0231 ........ 0.0269
16-bit array #1 ...... 0.0662 ........ 0.0546 ...... 0.0345 ........ 0.0391
16-bit array #2 ........... S ............. S ........... S ............. S
32-bit array .............. S ............. S ........... S ............. S
complex array ............. I ............. I ........... F ............. F
fix map #1 ................ I ............. I ........... F ............. I
fix map #2 ........... 0.0214 ........ 0.0306 ...... 0.0197 ........ 0.0207
fix map #3 ................ I ............. I ........... F ............. I
fix map #4 ........... 0.0292 ........ 0.0270 ...... 0.0306 ........ 0.0209
16-bit map #1 ........ 0.1031 ........ 0.0896 ...... 0.0378 ........ 0.0506
16-bit map #2 ............. S ............. S ........... S ............. S
32-bit map ................ S ............. S ........... S ............. S
complex map .......... 0.1164 ........ 0.1131 ...... 0.0591 ........ 0.0583
fixext 1 .................. I ............. I ........... F ............. F
fixext 2 .................. I ............. I ........... F ............. F
fixext 4 .................. I ............. I ........... F ............. F
fixext 8 .................. I ............. I ........... F ............. F
fixext 16 ................. I ............. I ........... F ............. F
8-bit ext ................. I ............. I ........... F ............. F
16-bit ext ................ I ............. I ........... F ............. F
32-bit ext ................ I ............. I ........... F ............. F
===========================================================================
Total                  1.1056          1.3705        0.9900          0.8214
Skipped                     4               4             4               4
Failed                      0               0            16               9
Ignored                    16              16             0               7

Note that the msgpack extension (v2.1.2) doesn't support ext, bin and UTF-8 str types.

License

The library is released under the MIT License. See the bundled LICENSE file for details.

Comments
  • Try unpacking without recursion

    Try unpacking without recursion

    This is an attempt to speed up unpacking by inlining the recursive unpack() calls. Unfortunately, it seems that this change makes unpacking not faster, but slower:

    Opcache disabled:

    MP_BENCH_TESTS='complex map' MP_BENCH_TARGETS=pure_bu php -n -dpcre.jit=1 tests/bench.php
    

    | master | no_recursion | | ------- | -------------- | | 0.3763 | 0.5335 |

    Opcache enabled:

    MP_BENCH_TESTS='complex map' MP_BENCH_TARGETS=pure_bu php -n -dpcre.jit=1 -dzend_extension=opcache.so -dopcache.enable=1 -dopcache.enable_cli=1 tests/bench.php
    

    | master | no_recursion | | ------- | -------------- | | 0.3193 | 0.4729 |

    JIT enabled (tracing):

    MP_BENCH_TESTS='complex map' MP_BENCH_TARGETS=pure_bu php -n -dpcre.jit=1 -dzend_extension=opcache.so -dopcache.jit_buffer_size=64M -dopcache.jit=tracing -dopcache.enable=1 -dopcache.enable_cli=1 tests/bench.php
    

    | master | no_recursion | | ------- | -------------- | | 0.1133 | 0.2019 |

    Opcodes:

     php -d opcache.opt_debug_level=0x20000 -dopcache.enable_cli=1 unpack.php
    
    master
    MessagePack\BufferUnpacker::unpack:
         ; (lines=530, args=0, vars=1, tmps=112)
         ; (after optimizer)
         ; .../msgpack.php/src/BufferUnpacker.php:181-280
    0000 EXT_STMT
    0001 T2 = FETCH_OBJ_R THIS string("offset")
    0002 T1 = FETCH_OBJ_IS THIS string("buffer")
    0003 T3 = ISSET_ISEMPTY_DIM_OBJ (isset) T1 T2
    0004 T4 = BOOL_NOT T3
    0005 JMPZ T4 0010
    0006 EXT_STMT
    0007 V5 = NEW 0 string("MessagePack\Exception\InsufficientDataException")
    0008 DO_FCALL
    0009 THROW V5
    0010 EXT_STMT
    0011 INIT_FCALL 1 96 string("ord")
    0012 T8 = FETCH_OBJ_R THIS string("offset")
    0013 T7 = FETCH_OBJ_R THIS string("buffer")
    0014 T9 = FETCH_DIM_R T7 T8
    0015 SEND_VAL T9 1
    0016 V10 = DO_FCALL
    0017 ASSIGN CV0($c) V10
    0018 EXT_STMT
    0019 PRE_INC_OBJ THIS string("offset")
    0020 EXT_STMT
    0021 T13 = IS_SMALLER_OR_EQUAL CV0($c) int(127)
    0022 JMPZ T13 0025
    0023 EXT_STMT
    0024 RETURN CV0($c)
    0025 EXT_STMT
    0026 T14 = IS_SMALLER_OR_EQUAL int(160) CV0($c)
    0027 T14 = JMPZ_EX T14 0030
    0028 T15 = IS_SMALLER_OR_EQUAL CV0($c) int(191)
    0029 T14 = BOOL T15
    0030 JMPZ T14 0042
    0031 EXT_STMT
    0032 T16 = BW_AND CV0($c) int(31)
    0033 JMPZ T16 0040
    0034 INIT_METHOD_CALL 1 THIS string("read")
    0035 T17 = BW_AND CV0($c) int(31)
    0036 SEND_VAL_EX T17 1
    0037 V18 = DO_FCALL
    0038 T19 = QM_ASSIGN V18
    0039 JMP 0041
    0040 T19 = QM_ASSIGN string("")
    0041 RETURN T19
    0042 EXT_STMT
    0043 T20 = IS_SMALLER_OR_EQUAL int(224) CV0($c)
    0044 JMPZ T20 0048
    0045 EXT_STMT
    0046 T21 = SUB CV0($c) int(256)
    0047 RETURN T21
    0048 EXT_STMT
    0049 SWITCH_LONG CV0($c) 192: 0177, 194: 0179, 195: 0181, 128: 0183, 129: 0185, 130: 0192, 131: 0204, 132: 0221, 133: 0226, 134: 0231, 135: 0236, 136: 0241, 137: 0246, 138: 0251, 139: 0256, 140: 0261, 141: 0266, 142: 0271, 143: 0276, 144: 0281, 145: 0283, 146: 0288, 147: 0296, 148: 0307, 149: 0312, 150: 0317, 151: 0322, 152: 0327, 153: 0332, 154: 0337, 155: 0342, 156: 0347, 157: 0352, 158: 0357, 159: 0362, 196: 0367, 197: 0374, 198: 0381, 202: 0388, 203: 0392, 204: 0396, 205: 0400, 206: 0404, 207: 0408, 208: 0412, 209: 0416, 210: 0420, 211: 0424, 217: 0428, 218: 0435, 219: 0442, 220: 0449, 221: 0456, 222: 0463, 223: 0470, 212: 0477, 213: 0482, 214: 0487, 215: 0492, 216: 0497, 199: 0502, 200: 0509, 201: 0516, default: 0523
    0050 T22 = IS_EQUAL CV0($c) int(192)
    0051 JMPNZ T22 0177
    0052 T22 = IS_EQUAL CV0($c) int(194)
    0053 JMPNZ T22 0179
    0054 T22 = IS_EQUAL CV0($c) int(195)
    0055 JMPNZ T22 0181
    0056 T22 = IS_EQUAL CV0($c) int(128)
    0057 JMPNZ T22 0183
    0058 T22 = IS_EQUAL CV0($c) int(129)
    0059 JMPNZ T22 0185
    0060 T22 = IS_EQUAL CV0($c) int(130)
    0061 JMPNZ T22 0192
    0062 T22 = IS_EQUAL CV0($c) int(131)
    0063 JMPNZ T22 0204
    0064 T22 = IS_EQUAL CV0($c) int(132)
    0065 JMPNZ T22 0221
    0066 T22 = IS_EQUAL CV0($c) int(133)
    0067 JMPNZ T22 0226
    0068 T22 = IS_EQUAL CV0($c) int(134)
    0069 JMPNZ T22 0231
    0070 T22 = IS_EQUAL CV0($c) int(135)
    0071 JMPNZ T22 0236
    0072 T22 = IS_EQUAL CV0($c) int(136)
    0073 JMPNZ T22 0241
    0074 T22 = IS_EQUAL CV0($c) int(137)
    0075 JMPNZ T22 0246
    0076 T22 = IS_EQUAL CV0($c) int(138)
    0077 JMPNZ T22 0251
    0078 T22 = IS_EQUAL CV0($c) int(139)
    0079 JMPNZ T22 0256
    0080 T22 = IS_EQUAL CV0($c) int(140)
    0081 JMPNZ T22 0261
    0082 T22 = IS_EQUAL CV0($c) int(141)
    0083 JMPNZ T22 0266
    0084 T22 = IS_EQUAL CV0($c) int(142)
    0085 JMPNZ T22 0271
    0086 T22 = IS_EQUAL CV0($c) int(143)
    0087 JMPNZ T22 0276
    0088 T22 = IS_EQUAL CV0($c) int(144)
    0089 JMPNZ T22 0281
    0090 T22 = IS_EQUAL CV0($c) int(145)
    0091 JMPNZ T22 0283
    0092 T22 = IS_EQUAL CV0($c) int(146)
    0093 JMPNZ T22 0288
    0094 T22 = IS_EQUAL CV0($c) int(147)
    0095 JMPNZ T22 0296
    0096 T22 = IS_EQUAL CV0($c) int(148)
    0097 JMPNZ T22 0307
    0098 T22 = IS_EQUAL CV0($c) int(149)
    0099 JMPNZ T22 0312
    0100 T22 = IS_EQUAL CV0($c) int(150)
    0101 JMPNZ T22 0317
    0102 T22 = IS_EQUAL CV0($c) int(151)
    0103 JMPNZ T22 0322
    0104 T22 = IS_EQUAL CV0($c) int(152)
    0105 JMPNZ T22 0327
    0106 T22 = IS_EQUAL CV0($c) int(153)
    0107 JMPNZ T22 0332
    0108 T22 = IS_EQUAL CV0($c) int(154)
    0109 JMPNZ T22 0337
    0110 T22 = IS_EQUAL CV0($c) int(155)
    0111 JMPNZ T22 0342
    0112 T22 = IS_EQUAL CV0($c) int(156)
    0113 JMPNZ T22 0347
    0114 T22 = IS_EQUAL CV0($c) int(157)
    0115 JMPNZ T22 0352
    0116 T22 = IS_EQUAL CV0($c) int(158)
    0117 JMPNZ T22 0357
    0118 T22 = IS_EQUAL CV0($c) int(159)
    0119 JMPNZ T22 0362
    0120 T22 = IS_EQUAL CV0($c) int(196)
    0121 JMPNZ T22 0367
    0122 T22 = IS_EQUAL CV0($c) int(197)
    0123 JMPNZ T22 0374
    0124 T22 = IS_EQUAL CV0($c) int(198)
    0125 JMPNZ T22 0381
    0126 T22 = IS_EQUAL CV0($c) int(202)
    0127 JMPNZ T22 0388
    0128 T22 = IS_EQUAL CV0($c) int(203)
    0129 JMPNZ T22 0392
    0130 T22 = IS_EQUAL CV0($c) int(204)
    0131 JMPNZ T22 0396
    0132 T22 = IS_EQUAL CV0($c) int(205)
    0133 JMPNZ T22 0400
    0134 T22 = IS_EQUAL CV0($c) int(206)
    0135 JMPNZ T22 0404
    0136 T22 = IS_EQUAL CV0($c) int(207)
    0137 JMPNZ T22 0408
    0138 T22 = IS_EQUAL CV0($c) int(208)
    0139 JMPNZ T22 0412
    0140 T22 = IS_EQUAL CV0($c) int(209)
    0141 JMPNZ T22 0416
    0142 T22 = IS_EQUAL CV0($c) int(210)
    0143 JMPNZ T22 0420
    0144 T22 = IS_EQUAL CV0($c) int(211)
    0145 JMPNZ T22 0424
    0146 T22 = IS_EQUAL CV0($c) int(217)
    0147 JMPNZ T22 0428
    0148 T22 = IS_EQUAL CV0($c) int(218)
    0149 JMPNZ T22 0435
    0150 T22 = IS_EQUAL CV0($c) int(219)
    0151 JMPNZ T22 0442
    0152 T22 = IS_EQUAL CV0($c) int(220)
    0153 JMPNZ T22 0449
    0154 T22 = IS_EQUAL CV0($c) int(221)
    0155 JMPNZ T22 0456
    0156 T22 = IS_EQUAL CV0($c) int(222)
    0157 JMPNZ T22 0463
    0158 T22 = IS_EQUAL CV0($c) int(223)
    0159 JMPNZ T22 0470
    0160 T22 = IS_EQUAL CV0($c) int(212)
    0161 JMPNZ T22 0477
    0162 T22 = IS_EQUAL CV0($c) int(213)
    0163 JMPNZ T22 0482
    0164 T22 = IS_EQUAL CV0($c) int(214)
    0165 JMPNZ T22 0487
    0166 T22 = IS_EQUAL CV0($c) int(215)
    0167 JMPNZ T22 0492
    0168 T22 = IS_EQUAL CV0($c) int(216)
    0169 JMPNZ T22 0497
    0170 T22 = IS_EQUAL CV0($c) int(199)
    0171 JMPNZ T22 0502
    0172 T22 = IS_EQUAL CV0($c) int(200)
    0173 JMPNZ T22 0509
    0174 T22 = IS_EQUAL CV0($c) int(201)
    0175 JMPNZ T22 0516
    0176 JMP 0523
    0177 EXT_STMT
    0178 RETURN null
    0179 EXT_STMT
    0180 RETURN bool(false)
    0181 EXT_STMT
    0182 RETURN bool(true)
    0183 EXT_STMT
    0184 RETURN array(...)
    0185 EXT_STMT
    0186 INIT_METHOD_CALL 0 THIS string("unpackMapKey")
    0187 V23 = DO_FCALL
    0188 INIT_METHOD_CALL 0 THIS string("unpack")
    0189 V24 = DO_FCALL
    0190 T25 = INIT_ARRAY 1 (packed) V24 V23
    0191 RETURN T25
    0192 EXT_STMT
    0193 INIT_METHOD_CALL 0 THIS string("unpackMapKey")
    0194 V26 = DO_FCALL
    0195 INIT_METHOD_CALL 0 THIS string("unpack")
    0196 V27 = DO_FCALL
    0197 T28 = INIT_ARRAY 2 (packed) V27 V26
    0198 INIT_METHOD_CALL 0 THIS string("unpackMapKey")
    0199 V29 = DO_FCALL
    0200 INIT_METHOD_CALL 0 THIS string("unpack")
    0201 V30 = DO_FCALL
    0202 T28 = ADD_ARRAY_ELEMENT V30 V29
    0203 RETURN T28
    0204 EXT_STMT
    0205 INIT_METHOD_CALL 0 THIS string("unpackMapKey")
    0206 V31 = DO_FCALL
    0207 INIT_METHOD_CALL 0 THIS string("unpack")
    0208 V32 = DO_FCALL
    0209 T33 = INIT_ARRAY 3 (packed) V32 V31
    0210 INIT_METHOD_CALL 0 THIS string("unpackMapKey")
    0211 V34 = DO_FCALL
    0212 INIT_METHOD_CALL 0 THIS string("unpack")
    0213 V35 = DO_FCALL
    0214 T33 = ADD_ARRAY_ELEMENT V35 V34
    0215 INIT_METHOD_CALL 0 THIS string("unpackMapKey")
    0216 V36 = DO_FCALL
    0217 INIT_METHOD_CALL 0 THIS string("unpack")
    0218 V37 = DO_FCALL
    0219 T33 = ADD_ARRAY_ELEMENT V37 V36
    0220 RETURN T33
    0221 EXT_STMT
    0222 INIT_METHOD_CALL 1 THIS string("unpackMapData")
    0223 SEND_VAL_EX int(4) 1
    0224 V38 = DO_FCALL
    0225 RETURN V38
    0226 EXT_STMT
    0227 INIT_METHOD_CALL 1 THIS string("unpackMapData")
    0228 SEND_VAL_EX int(5) 1
    0229 V39 = DO_FCALL
    0230 RETURN V39
    0231 EXT_STMT
    0232 INIT_METHOD_CALL 1 THIS string("unpackMapData")
    0233 SEND_VAL_EX int(6) 1
    0234 V40 = DO_FCALL
    0235 RETURN V40
    0236 EXT_STMT
    0237 INIT_METHOD_CALL 1 THIS string("unpackMapData")
    0238 SEND_VAL_EX int(7) 1
    0239 V41 = DO_FCALL
    0240 RETURN V41
    0241 EXT_STMT
    0242 INIT_METHOD_CALL 1 THIS string("unpackMapData")
    0243 SEND_VAL_EX int(8) 1
    0244 V42 = DO_FCALL
    0245 RETURN V42
    0246 EXT_STMT
    0247 INIT_METHOD_CALL 1 THIS string("unpackMapData")
    0248 SEND_VAL_EX int(9) 1
    0249 V43 = DO_FCALL
    0250 RETURN V43
    0251 EXT_STMT
    0252 INIT_METHOD_CALL 1 THIS string("unpackMapData")
    0253 SEND_VAL_EX int(10) 1
    0254 V44 = DO_FCALL
    0255 RETURN V44
    0256 EXT_STMT
    0257 INIT_METHOD_CALL 1 THIS string("unpackMapData")
    0258 SEND_VAL_EX int(11) 1
    0259 V45 = DO_FCALL
    0260 RETURN V45
    0261 EXT_STMT
    0262 INIT_METHOD_CALL 1 THIS string("unpackMapData")
    0263 SEND_VAL_EX int(12) 1
    0264 V46 = DO_FCALL
    0265 RETURN V46
    0266 EXT_STMT
    0267 INIT_METHOD_CALL 1 THIS string("unpackMapData")
    0268 SEND_VAL_EX int(13) 1
    0269 V47 = DO_FCALL
    0270 RETURN V47
    0271 EXT_STMT
    0272 INIT_METHOD_CALL 1 THIS string("unpackMapData")
    0273 SEND_VAL_EX int(14) 1
    0274 V48 = DO_FCALL
    0275 RETURN V48
    0276 EXT_STMT
    0277 INIT_METHOD_CALL 1 THIS string("unpackMapData")
    0278 SEND_VAL_EX int(15) 1
    0279 V49 = DO_FCALL
    0280 RETURN V49
    0281 EXT_STMT
    0282 RETURN array(...)
    0283 EXT_STMT
    0284 INIT_METHOD_CALL 0 THIS string("unpack")
    0285 V50 = DO_FCALL
    0286 T51 = INIT_ARRAY 1 (packed) V50 NEXT
    0287 RETURN T51
    0288 EXT_STMT
    0289 INIT_METHOD_CALL 0 THIS string("unpack")
    0290 V52 = DO_FCALL
    0291 T53 = INIT_ARRAY 2 (packed) V52 NEXT
    0292 INIT_METHOD_CALL 0 THIS string("unpack")
    0293 V54 = DO_FCALL
    0294 T53 = ADD_ARRAY_ELEMENT V54 NEXT
    0295 RETURN T53
    0296 EXT_STMT
    0297 INIT_METHOD_CALL 0 THIS string("unpack")
    0298 V55 = DO_FCALL
    0299 T56 = INIT_ARRAY 3 (packed) V55 NEXT
    0300 INIT_METHOD_CALL 0 THIS string("unpack")
    0301 V57 = DO_FCALL
    0302 T56 = ADD_ARRAY_ELEMENT V57 NEXT
    0303 INIT_METHOD_CALL 0 THIS string("unpack")
    0304 V58 = DO_FCALL
    0305 T56 = ADD_ARRAY_ELEMENT V58 NEXT
    0306 RETURN T56
    0307 EXT_STMT
    0308 INIT_METHOD_CALL 1 THIS string("unpackArrayData")
    0309 SEND_VAL_EX int(4) 1
    0310 V59 = DO_FCALL
    0311 RETURN V59
    0312 EXT_STMT
    0313 INIT_METHOD_CALL 1 THIS string("unpackArrayData")
    0314 SEND_VAL_EX int(5) 1
    0315 V60 = DO_FCALL
    0316 RETURN V60
    0317 EXT_STMT
    0318 INIT_METHOD_CALL 1 THIS string("unpackArrayData")
    0319 SEND_VAL_EX int(6) 1
    0320 V61 = DO_FCALL
    0321 RETURN V61
    0322 EXT_STMT
    0323 INIT_METHOD_CALL 1 THIS string("unpackArrayData")
    0324 SEND_VAL_EX int(7) 1
    0325 V62 = DO_FCALL
    0326 RETURN V62
    0327 EXT_STMT
    0328 INIT_METHOD_CALL 1 THIS string("unpackArrayData")
    0329 SEND_VAL_EX int(8) 1
    0330 V63 = DO_FCALL
    0331 RETURN V63
    0332 EXT_STMT
    0333 INIT_METHOD_CALL 1 THIS string("unpackArrayData")
    0334 SEND_VAL_EX int(9) 1
    0335 V64 = DO_FCALL
    0336 RETURN V64
    0337 EXT_STMT
    0338 INIT_METHOD_CALL 1 THIS string("unpackArrayData")
    0339 SEND_VAL_EX int(10) 1
    0340 V65 = DO_FCALL
    0341 RETURN V65
    0342 EXT_STMT
    0343 INIT_METHOD_CALL 1 THIS string("unpackArrayData")
    0344 SEND_VAL_EX int(11) 1
    0345 V66 = DO_FCALL
    0346 RETURN V66
    0347 EXT_STMT
    0348 INIT_METHOD_CALL 1 THIS string("unpackArrayData")
    0349 SEND_VAL_EX int(12) 1
    0350 V67 = DO_FCALL
    0351 RETURN V67
    0352 EXT_STMT
    0353 INIT_METHOD_CALL 1 THIS string("unpackArrayData")
    0354 SEND_VAL_EX int(13) 1
    0355 V68 = DO_FCALL
    0356 RETURN V68
    0357 EXT_STMT
    0358 INIT_METHOD_CALL 1 THIS string("unpackArrayData")
    0359 SEND_VAL_EX int(14) 1
    0360 V69 = DO_FCALL
    0361 RETURN V69
    0362 EXT_STMT
    0363 INIT_METHOD_CALL 1 THIS string("unpackArrayData")
    0364 SEND_VAL_EX int(15) 1
    0365 V70 = DO_FCALL
    0366 RETURN V70
    0367 EXT_STMT
    0368 INIT_METHOD_CALL 1 THIS string("read")
    0369 INIT_METHOD_CALL 0 THIS string("unpackUint8")
    0370 V71 = DO_FCALL
    0371 SEND_VAR_NO_REF_EX V71 1
    0372 V72 = DO_FCALL
    0373 RETURN V72
    0374 EXT_STMT
    0375 INIT_METHOD_CALL 1 THIS string("read")
    0376 INIT_METHOD_CALL 0 THIS string("unpackUint16")
    0377 V73 = DO_FCALL
    0378 SEND_VAR_NO_REF_EX V73 1
    0379 V74 = DO_FCALL
    0380 RETURN V74
    0381 EXT_STMT
    0382 INIT_METHOD_CALL 1 THIS string("read")
    0383 INIT_METHOD_CALL 0 THIS string("unpackUint32")
    0384 V75 = DO_FCALL
    0385 SEND_VAR_NO_REF_EX V75 1
    0386 V76 = DO_FCALL
    0387 RETURN V76
    0388 EXT_STMT
    0389 INIT_METHOD_CALL 0 THIS string("unpackFloat32")
    0390 V77 = DO_FCALL
    0391 RETURN V77
    0392 EXT_STMT
    0393 INIT_METHOD_CALL 0 THIS string("unpackFloat64")
    0394 V78 = DO_FCALL
    0395 RETURN V78
    0396 EXT_STMT
    0397 INIT_METHOD_CALL 0 THIS string("unpackUint8")
    0398 V79 = DO_FCALL
    0399 RETURN V79
    0400 EXT_STMT
    0401 INIT_METHOD_CALL 0 THIS string("unpackUint16")
    0402 V80 = DO_FCALL
    0403 RETURN V80
    0404 EXT_STMT
    0405 INIT_METHOD_CALL 0 THIS string("unpackUint32")
    0406 V81 = DO_FCALL
    0407 RETURN V81
    0408 EXT_STMT
    0409 INIT_METHOD_CALL 0 THIS string("unpackUint64")
    0410 V82 = DO_FCALL
    0411 RETURN V82
    0412 EXT_STMT
    0413 INIT_METHOD_CALL 0 THIS string("unpackInt8")
    0414 V83 = DO_FCALL
    0415 RETURN V83
    0416 EXT_STMT
    0417 INIT_METHOD_CALL 0 THIS string("unpackInt16")
    0418 V84 = DO_FCALL
    0419 RETURN V84
    0420 EXT_STMT
    0421 INIT_METHOD_CALL 0 THIS string("unpackInt32")
    0422 V85 = DO_FCALL
    0423 RETURN V85
    0424 EXT_STMT
    0425 INIT_METHOD_CALL 0 THIS string("unpackInt64")
    0426 V86 = DO_FCALL
    0427 RETURN V86
    0428 EXT_STMT
    0429 INIT_METHOD_CALL 1 THIS string("read")
    0430 INIT_METHOD_CALL 0 THIS string("unpackUint8")
    0431 V87 = DO_FCALL
    0432 SEND_VAR_NO_REF_EX V87 1
    0433 V88 = DO_FCALL
    0434 RETURN V88
    0435 EXT_STMT
    0436 INIT_METHOD_CALL 1 THIS string("read")
    0437 INIT_METHOD_CALL 0 THIS string("unpackUint16")
    0438 V89 = DO_FCALL
    0439 SEND_VAR_NO_REF_EX V89 1
    0440 V90 = DO_FCALL
    0441 RETURN V90
    0442 EXT_STMT
    0443 INIT_METHOD_CALL 1 THIS string("read")
    0444 INIT_METHOD_CALL 0 THIS string("unpackUint32")
    0445 V91 = DO_FCALL
    0446 SEND_VAR_NO_REF_EX V91 1
    0447 V92 = DO_FCALL
    0448 RETURN V92
    0449 EXT_STMT
    0450 INIT_METHOD_CALL 1 THIS string("unpackArrayData")
    0451 INIT_METHOD_CALL 0 THIS string("unpackUint16")
    0452 V93 = DO_FCALL
    0453 SEND_VAR_NO_REF_EX V93 1
    0454 V94 = DO_FCALL
    0455 RETURN V94
    0456 EXT_STMT
    0457 INIT_METHOD_CALL 1 THIS string("unpackArrayData")
    0458 INIT_METHOD_CALL 0 THIS string("unpackUint32")
    0459 V95 = DO_FCALL
    0460 SEND_VAR_NO_REF_EX V95 1
    0461 V96 = DO_FCALL
    0462 RETURN V96
    0463 EXT_STMT
    0464 INIT_METHOD_CALL 1 THIS string("unpackMapData")
    0465 INIT_METHOD_CALL 0 THIS string("unpackUint16")
    0466 V97 = DO_FCALL
    0467 SEND_VAR_NO_REF_EX V97 1
    0468 V98 = DO_FCALL
    0469 RETURN V98
    0470 EXT_STMT
    0471 INIT_METHOD_CALL 1 THIS string("unpackMapData")
    0472 INIT_METHOD_CALL 0 THIS string("unpackUint32")
    0473 V99 = DO_FCALL
    0474 SEND_VAR_NO_REF_EX V99 1
    0475 V100 = DO_FCALL
    0476 RETURN V100
    0477 EXT_STMT
    0478 INIT_METHOD_CALL 1 THIS string("unpackExtData")
    0479 SEND_VAL_EX int(1) 1
    0480 V101 = DO_FCALL
    0481 RETURN V101
    0482 EXT_STMT
    0483 INIT_METHOD_CALL 1 THIS string("unpackExtData")
    0484 SEND_VAL_EX int(2) 1
    0485 V102 = DO_FCALL
    0486 RETURN V102
    0487 EXT_STMT
    0488 INIT_METHOD_CALL 1 THIS string("unpackExtData")
    0489 SEND_VAL_EX int(4) 1
    0490 V103 = DO_FCALL
    0491 RETURN V103
    0492 EXT_STMT
    0493 INIT_METHOD_CALL 1 THIS string("unpackExtData")
    0494 SEND_VAL_EX int(8) 1
    0495 V104 = DO_FCALL
    0496 RETURN V104
    0497 EXT_STMT
    0498 INIT_METHOD_CALL 1 THIS string("unpackExtData")
    0499 SEND_VAL_EX int(16) 1
    0500 V105 = DO_FCALL
    0501 RETURN V105
    0502 EXT_STMT
    0503 INIT_METHOD_CALL 1 THIS string("unpackExtData")
    0504 INIT_METHOD_CALL 0 THIS string("unpackUint8")
    0505 V106 = DO_FCALL
    0506 SEND_VAR_NO_REF_EX V106 1
    0507 V107 = DO_FCALL
    0508 RETURN V107
    0509 EXT_STMT
    0510 INIT_METHOD_CALL 1 THIS string("unpackExtData")
    0511 INIT_METHOD_CALL 0 THIS string("unpackUint16")
    0512 V108 = DO_FCALL
    0513 SEND_VAR_NO_REF_EX V108 1
    0514 V109 = DO_FCALL
    0515 RETURN V109
    0516 EXT_STMT
    0517 INIT_METHOD_CALL 1 THIS string("unpackExtData")
    0518 INIT_METHOD_CALL 0 THIS string("unpackUint32")
    0519 V110 = DO_FCALL
    0520 SEND_VAR_NO_REF_EX V110 1
    0521 V111 = DO_FCALL
    0522 RETURN V111
    0523 EXT_STMT
    0524 INIT_STATIC_METHOD_CALL 1 string("MessagePack\Exception\UnpackingFailedException") string("unknownCode")
    0525 SEND_VAR_EX CV0($c) 1
    0526 V112 = DO_FCALL
    0527 THROW V112
    0528 EXT_STMT
    0529 RETURN null
    
    no_recursion
    MessagePack\BufferUnpacker4::unpack:
         ; (lines=844, args=0, vars=8, tmps=256)
         ; (after optimizer)
         ; .../msgpack.php/src/BufferUnpacker.php:182-342
    0000 EXT_STMT
    0001 V8 = FETCH_OBJ_W (ref) THIS string("buffer")
    0002 ASSIGN_REF CV0($buffer) V8
    0003 EXT_STMT
    0004 V10 = FETCH_OBJ_W (ref) THIS string("offset")
    0005 ASSIGN_REF CV1($offset) V10
    0006 EXT_STMT
    0007 ASSIGN CV2($stack) array(...)
    0008 EXT_STMT
    0009 ASSIGN CV3($top) int(0)
    0010 EXT_STMT
    0011 T14 = ISSET_ISEMPTY_DIM_OBJ (isset) CV0($buffer) CV1($offset)
    0012 T15 = BOOL_NOT T14
    0013 JMPZ T15 0018
    0014 EXT_STMT
    0015 V16 = NEW 0 string("MessagePack\Exception\InsufficientDataException")
    0016 DO_FCALL
    0017 THROW V16
    0018 EXT_STMT
    0019 INIT_FCALL 1 96 string("ord")
    0020 T18 = FETCH_DIM_R CV0($buffer) CV1($offset)
    0021 SEND_VAL T18 1
    0022 V19 = DO_FCALL
    0023 ASSIGN CV4($c) V19
    0024 EXT_STMT
    0025 PRE_INC CV1($offset)
    0026 EXT_STMT
    0027 T22 = IS_SMALLER_OR_EQUAL CV4($c) int(127)
    0028 JMPZ T22 0033
    0029 EXT_STMT
    0030 ASSIGN CV5($value) CV4($c)
    0031 EXT_STMT
    0032 JMP 0782
    0033 EXT_STMT
    0034 T24 = IS_SMALLER_OR_EQUAL int(160) CV4($c)
    0035 T24 = JMPZ_EX T24 0038
    0036 T25 = IS_SMALLER_OR_EQUAL CV4($c) int(191)
    0037 T24 = BOOL T25
    0038 JMPZ T24 0051
    0039 EXT_STMT
    0040 T26 = BW_AND CV4($c) int(31)
    0041 JMPZ T26 0047
    0042 EXT_STMT
    0043 T27 = BW_AND CV4($c) int(31)
    0044 ASSIGN CV6($length) T27
    0045 EXT_STMT
    0046 JMP 0763
    0047 EXT_STMT
    0048 ASSIGN CV5($value) string("")
    0049 EXT_STMT
    0050 JMP 0782
    0051 EXT_STMT
    0052 T30 = IS_SMALLER_OR_EQUAL int(224) CV4($c)
    0053 JMPZ T30 0059
    0054 EXT_STMT
    0055 T31 = SUB CV4($c) int(256)
    0056 ASSIGN CV5($value) T31
    0057 EXT_STMT
    0058 JMP 0782
    0059 EXT_STMT
    0060 SWITCH_LONG CV4($c) 192: 0188, 194: 0192, 195: 0196, 128: 0200, 129: 0204, 130: 0214, 131: 0224, 132: 0234, 133: 0244, 134: 0254, 135: 0264, 136: 0274, 137: 0284, 138: 0294, 139: 0304, 140: 0314, 141: 0324, 142: 0334, 143: 0344, 144: 0354, 145: 0358, 146: 0368, 147: 0378, 148: 0388, 149: 0398, 150: 0408, 151: 0418, 152: 0428, 153: 0438, 154: 0448, 155: 0458, 156: 0468, 157: 0478, 158: 0488, 159: 0498, 196: 0508, 197: 0516, 198: 0524, 202: 0532, 203: 0540, 204: 0548, 205: 0556, 206: 0564, 207: 0572, 208: 0578, 209: 0586, 210: 0594, 211: 0602, 217: 0610, 218: 0618, 219: 0626, 220: 0634, 221: 0648, 222: 0662, 223: 0676, 212: 0690, 213: 0697, 214: 0704, 215: 0711, 216: 0718, 199: 0725, 200: 0736, 201: 0747, default: 0758
    0061 T33 = IS_EQUAL CV4($c) int(192)
    0062 JMPNZ T33 0188
    0063 T33 = IS_EQUAL CV4($c) int(194)
    0064 JMPNZ T33 0192
    0065 T33 = IS_EQUAL CV4($c) int(195)
    0066 JMPNZ T33 0196
    0067 T33 = IS_EQUAL CV4($c) int(128)
    0068 JMPNZ T33 0200
    0069 T33 = IS_EQUAL CV4($c) int(129)
    0070 JMPNZ T33 0204
    0071 T33 = IS_EQUAL CV4($c) int(130)
    0072 JMPNZ T33 0214
    0073 T33 = IS_EQUAL CV4($c) int(131)
    0074 JMPNZ T33 0224
    0075 T33 = IS_EQUAL CV4($c) int(132)
    0076 JMPNZ T33 0234
    0077 T33 = IS_EQUAL CV4($c) int(133)
    0078 JMPNZ T33 0244
    0079 T33 = IS_EQUAL CV4($c) int(134)
    0080 JMPNZ T33 0254
    0081 T33 = IS_EQUAL CV4($c) int(135)
    0082 JMPNZ T33 0264
    0083 T33 = IS_EQUAL CV4($c) int(136)
    0084 JMPNZ T33 0274
    0085 T33 = IS_EQUAL CV4($c) int(137)
    0086 JMPNZ T33 0284
    0087 T33 = IS_EQUAL CV4($c) int(138)
    0088 JMPNZ T33 0294
    0089 T33 = IS_EQUAL CV4($c) int(139)
    0090 JMPNZ T33 0304
    0091 T33 = IS_EQUAL CV4($c) int(140)
    0092 JMPNZ T33 0314
    0093 T33 = IS_EQUAL CV4($c) int(141)
    0094 JMPNZ T33 0324
    0095 T33 = IS_EQUAL CV4($c) int(142)
    0096 JMPNZ T33 0334
    0097 T33 = IS_EQUAL CV4($c) int(143)
    0098 JMPNZ T33 0344
    0099 T33 = IS_EQUAL CV4($c) int(144)
    0100 JMPNZ T33 0354
    0101 T33 = IS_EQUAL CV4($c) int(145)
    0102 JMPNZ T33 0358
    0103 T33 = IS_EQUAL CV4($c) int(146)
    0104 JMPNZ T33 0368
    0105 T33 = IS_EQUAL CV4($c) int(147)
    0106 JMPNZ T33 0378
    0107 T33 = IS_EQUAL CV4($c) int(148)
    0108 JMPNZ T33 0388
    0109 T33 = IS_EQUAL CV4($c) int(149)
    0110 JMPNZ T33 0398
    0111 T33 = IS_EQUAL CV4($c) int(150)
    0112 JMPNZ T33 0408
    0113 T33 = IS_EQUAL CV4($c) int(151)
    0114 JMPNZ T33 0418
    0115 T33 = IS_EQUAL CV4($c) int(152)
    0116 JMPNZ T33 0428
    0117 T33 = IS_EQUAL CV4($c) int(153)
    0118 JMPNZ T33 0438
    0119 T33 = IS_EQUAL CV4($c) int(154)
    0120 JMPNZ T33 0448
    0121 T33 = IS_EQUAL CV4($c) int(155)
    0122 JMPNZ T33 0458
    0123 T33 = IS_EQUAL CV4($c) int(156)
    0124 JMPNZ T33 0468
    0125 T33 = IS_EQUAL CV4($c) int(157)
    0126 JMPNZ T33 0478
    0127 T33 = IS_EQUAL CV4($c) int(158)
    0128 JMPNZ T33 0488
    0129 T33 = IS_EQUAL CV4($c) int(159)
    0130 JMPNZ T33 0498
    0131 T33 = IS_EQUAL CV4($c) int(196)
    0132 JMPNZ T33 0508
    0133 T33 = IS_EQUAL CV4($c) int(197)
    0134 JMPNZ T33 0516
    0135 T33 = IS_EQUAL CV4($c) int(198)
    0136 JMPNZ T33 0524
    0137 T33 = IS_EQUAL CV4($c) int(202)
    0138 JMPNZ T33 0532
    0139 T33 = IS_EQUAL CV4($c) int(203)
    0140 JMPNZ T33 0540
    0141 T33 = IS_EQUAL CV4($c) int(204)
    0142 JMPNZ T33 0548
    0143 T33 = IS_EQUAL CV4($c) int(205)
    0144 JMPNZ T33 0556
    0145 T33 = IS_EQUAL CV4($c) int(206)
    0146 JMPNZ T33 0564
    0147 T33 = IS_EQUAL CV4($c) int(207)
    0148 JMPNZ T33 0572
    0149 T33 = IS_EQUAL CV4($c) int(208)
    0150 JMPNZ T33 0578
    0151 T33 = IS_EQUAL CV4($c) int(209)
    0152 JMPNZ T33 0586
    0153 T33 = IS_EQUAL CV4($c) int(210)
    0154 JMPNZ T33 0594
    0155 T33 = IS_EQUAL CV4($c) int(211)
    0156 JMPNZ T33 0602
    0157 T33 = IS_EQUAL CV4($c) int(217)
    0158 JMPNZ T33 0610
    0159 T33 = IS_EQUAL CV4($c) int(218)
    0160 JMPNZ T33 0618
    0161 T33 = IS_EQUAL CV4($c) int(219)
    0162 JMPNZ T33 0626
    0163 T33 = IS_EQUAL CV4($c) int(220)
    0164 JMPNZ T33 0634
    0165 T33 = IS_EQUAL CV4($c) int(221)
    0166 JMPNZ T33 0648
    0167 T33 = IS_EQUAL CV4($c) int(222)
    0168 JMPNZ T33 0662
    0169 T33 = IS_EQUAL CV4($c) int(223)
    0170 JMPNZ T33 0676
    0171 T33 = IS_EQUAL CV4($c) int(212)
    0172 JMPNZ T33 0690
    0173 T33 = IS_EQUAL CV4($c) int(213)
    0174 JMPNZ T33 0697
    0175 T33 = IS_EQUAL CV4($c) int(214)
    0176 JMPNZ T33 0704
    0177 T33 = IS_EQUAL CV4($c) int(215)
    0178 JMPNZ T33 0711
    0179 T33 = IS_EQUAL CV4($c) int(216)
    0180 JMPNZ T33 0718
    0181 T33 = IS_EQUAL CV4($c) int(199)
    0182 JMPNZ T33 0725
    0183 T33 = IS_EQUAL CV4($c) int(200)
    0184 JMPNZ T33 0736
    0185 T33 = IS_EQUAL CV4($c) int(201)
    0186 JMPNZ T33 0747
    0187 JMP 0758
    0188 EXT_STMT
    0189 ASSIGN CV5($value) null
    0190 EXT_STMT
    0191 JMP 0782
    0192 EXT_STMT
    0193 ASSIGN CV5($value) bool(false)
    0194 EXT_STMT
    0195 JMP 0782
    0196 EXT_STMT
    0197 ASSIGN CV5($value) bool(true)
    0198 EXT_STMT
    0199 JMP 0782
    0200 EXT_STMT
    0201 ASSIGN CV5($value) array(...)
    0202 EXT_STMT
    0203 JMP 0782
    0204 EXT_STMT
    0205 T38 = PRE_INC CV3($top)
    0206 V40 = NEW 2 string("MessagePack\State")
    0207 SEND_VAL_EX int(2) 1
    0208 SEND_VAL_EX int(1) 2
    0209 DO_FCALL
    0210 ASSIGN_DIM CV2($stack) T38
    0211 OP_DATA V40
    0212 EXT_STMT
    0213 JMP 0010
    0214 EXT_STMT
    0215 T42 = PRE_INC CV3($top)
    0216 V44 = NEW 2 string("MessagePack\State")
    0217 SEND_VAL_EX int(2) 1
    0218 SEND_VAL_EX int(2) 2
    0219 DO_FCALL
    0220 ASSIGN_DIM CV2($stack) T42
    0221 OP_DATA V44
    0222 EXT_STMT
    0223 JMP 0010
    0224 EXT_STMT
    0225 T46 = PRE_INC CV3($top)
    0226 V48 = NEW 2 string("MessagePack\State")
    0227 SEND_VAL_EX int(2) 1
    0228 SEND_VAL_EX int(3) 2
    0229 DO_FCALL
    0230 ASSIGN_DIM CV2($stack) T46
    0231 OP_DATA V48
    0232 EXT_STMT
    0233 JMP 0010
    0234 EXT_STMT
    0235 T50 = PRE_INC CV3($top)
    0236 V52 = NEW 2 string("MessagePack\State")
    0237 SEND_VAL_EX int(2) 1
    0238 SEND_VAL_EX int(4) 2
    0239 DO_FCALL
    0240 ASSIGN_DIM CV2($stack) T50
    0241 OP_DATA V52
    0242 EXT_STMT
    0243 JMP 0010
    0244 EXT_STMT
    0245 T54 = PRE_INC CV3($top)
    0246 V56 = NEW 2 string("MessagePack\State")
    0247 SEND_VAL_EX int(2) 1
    0248 SEND_VAL_EX int(5) 2
    0249 DO_FCALL
    0250 ASSIGN_DIM CV2($stack) T54
    0251 OP_DATA V56
    0252 EXT_STMT
    0253 JMP 0010
    0254 EXT_STMT
    0255 T58 = PRE_INC CV3($top)
    0256 V60 = NEW 2 string("MessagePack\State")
    0257 SEND_VAL_EX int(2) 1
    0258 SEND_VAL_EX int(6) 2
    0259 DO_FCALL
    0260 ASSIGN_DIM CV2($stack) T58
    0261 OP_DATA V60
    0262 EXT_STMT
    0263 JMP 0010
    0264 EXT_STMT
    0265 T62 = PRE_INC CV3($top)
    0266 V64 = NEW 2 string("MessagePack\State")
    0267 SEND_VAL_EX int(2) 1
    0268 SEND_VAL_EX int(7) 2
    0269 DO_FCALL
    0270 ASSIGN_DIM CV2($stack) T62
    0271 OP_DATA V64
    0272 EXT_STMT
    0273 JMP 0010
    0274 EXT_STMT
    0275 T66 = PRE_INC CV3($top)
    0276 V68 = NEW 2 string("MessagePack\State")
    0277 SEND_VAL_EX int(2) 1
    0278 SEND_VAL_EX int(8) 2
    0279 DO_FCALL
    0280 ASSIGN_DIM CV2($stack) T66
    0281 OP_DATA V68
    0282 EXT_STMT
    0283 JMP 0010
    0284 EXT_STMT
    0285 T70 = PRE_INC CV3($top)
    0286 V72 = NEW 2 string("MessagePack\State")
    0287 SEND_VAL_EX int(2) 1
    0288 SEND_VAL_EX int(9) 2
    0289 DO_FCALL
    0290 ASSIGN_DIM CV2($stack) T70
    0291 OP_DATA V72
    0292 EXT_STMT
    0293 JMP 0010
    0294 EXT_STMT
    0295 T74 = PRE_INC CV3($top)
    0296 V76 = NEW 2 string("MessagePack\State")
    0297 SEND_VAL_EX int(2) 1
    0298 SEND_VAL_EX int(10) 2
    0299 DO_FCALL
    0300 ASSIGN_DIM CV2($stack) T74
    0301 OP_DATA V76
    0302 EXT_STMT
    0303 JMP 0010
    0304 EXT_STMT
    0305 T78 = PRE_INC CV3($top)
    0306 V80 = NEW 2 string("MessagePack\State")
    0307 SEND_VAL_EX int(2) 1
    0308 SEND_VAL_EX int(11) 2
    0309 DO_FCALL
    0310 ASSIGN_DIM CV2($stack) T78
    0311 OP_DATA V80
    0312 EXT_STMT
    0313 JMP 0010
    0314 EXT_STMT
    0315 T82 = PRE_INC CV3($top)
    0316 V84 = NEW 2 string("MessagePack\State")
    0317 SEND_VAL_EX int(2) 1
    0318 SEND_VAL_EX int(12) 2
    0319 DO_FCALL
    0320 ASSIGN_DIM CV2($stack) T82
    0321 OP_DATA V84
    0322 EXT_STMT
    0323 JMP 0010
    0324 EXT_STMT
    0325 T86 = PRE_INC CV3($top)
    0326 V88 = NEW 2 string("MessagePack\State")
    0327 SEND_VAL_EX int(2) 1
    0328 SEND_VAL_EX int(13) 2
    0329 DO_FCALL
    0330 ASSIGN_DIM CV2($stack) T86
    0331 OP_DATA V88
    0332 EXT_STMT
    0333 JMP 0010
    0334 EXT_STMT
    0335 T90 = PRE_INC CV3($top)
    0336 V92 = NEW 2 string("MessagePack\State")
    0337 SEND_VAL_EX int(2) 1
    0338 SEND_VAL_EX int(14) 2
    0339 DO_FCALL
    0340 ASSIGN_DIM CV2($stack) T90
    0341 OP_DATA V92
    0342 EXT_STMT
    0343 JMP 0010
    0344 EXT_STMT
    0345 T94 = PRE_INC CV3($top)
    0346 V96 = NEW 2 string("MessagePack\State")
    0347 SEND_VAL_EX int(2) 1
    0348 SEND_VAL_EX int(15) 2
    0349 DO_FCALL
    0350 ASSIGN_DIM CV2($stack) T94
    0351 OP_DATA V96
    0352 EXT_STMT
    0353 JMP 0010
    0354 EXT_STMT
    0355 ASSIGN CV5($value) array(...)
    0356 EXT_STMT
    0357 JMP 0782
    0358 EXT_STMT
    0359 T99 = PRE_INC CV3($top)
    0360 V101 = NEW 2 string("MessagePack\State")
    0361 SEND_VAL_EX int(1) 1
    0362 SEND_VAL_EX int(1) 2
    0363 DO_FCALL
    0364 ASSIGN_DIM CV2($stack) T99
    0365 OP_DATA V101
    0366 EXT_STMT
    0367 JMP 0010
    0368 EXT_STMT
    0369 T103 = PRE_INC CV3($top)
    0370 V105 = NEW 2 string("MessagePack\State")
    0371 SEND_VAL_EX int(1) 1
    0372 SEND_VAL_EX int(2) 2
    0373 DO_FCALL
    0374 ASSIGN_DIM CV2($stack) T103
    0375 OP_DATA V105
    0376 EXT_STMT
    0377 JMP 0010
    0378 EXT_STMT
    0379 T107 = PRE_INC CV3($top)
    0380 V109 = NEW 2 string("MessagePack\State")
    0381 SEND_VAL_EX int(1) 1
    0382 SEND_VAL_EX int(3) 2
    0383 DO_FCALL
    0384 ASSIGN_DIM CV2($stack) T107
    0385 OP_DATA V109
    0386 EXT_STMT
    0387 JMP 0010
    0388 EXT_STMT
    0389 T111 = PRE_INC CV3($top)
    0390 V113 = NEW 2 string("MessagePack\State")
    0391 SEND_VAL_EX int(1) 1
    0392 SEND_VAL_EX int(4) 2
    0393 DO_FCALL
    0394 ASSIGN_DIM CV2($stack) T111
    0395 OP_DATA V113
    0396 EXT_STMT
    0397 JMP 0010
    0398 EXT_STMT
    0399 T115 = PRE_INC CV3($top)
    0400 V117 = NEW 2 string("MessagePack\State")
    0401 SEND_VAL_EX int(1) 1
    0402 SEND_VAL_EX int(5) 2
    0403 DO_FCALL
    0404 ASSIGN_DIM CV2($stack) T115
    0405 OP_DATA V117
    0406 EXT_STMT
    0407 JMP 0010
    0408 EXT_STMT
    0409 T119 = PRE_INC CV3($top)
    0410 V121 = NEW 2 string("MessagePack\State")
    0411 SEND_VAL_EX int(1) 1
    0412 SEND_VAL_EX int(6) 2
    0413 DO_FCALL
    0414 ASSIGN_DIM CV2($stack) T119
    0415 OP_DATA V121
    0416 EXT_STMT
    0417 JMP 0010
    0418 EXT_STMT
    0419 T123 = PRE_INC CV3($top)
    0420 V125 = NEW 2 string("MessagePack\State")
    0421 SEND_VAL_EX int(1) 1
    0422 SEND_VAL_EX int(7) 2
    0423 DO_FCALL
    0424 ASSIGN_DIM CV2($stack) T123
    0425 OP_DATA V125
    0426 EXT_STMT
    0427 JMP 0010
    0428 EXT_STMT
    0429 T127 = PRE_INC CV3($top)
    0430 V129 = NEW 2 string("MessagePack\State")
    0431 SEND_VAL_EX int(1) 1
    0432 SEND_VAL_EX int(8) 2
    0433 DO_FCALL
    0434 ASSIGN_DIM CV2($stack) T127
    0435 OP_DATA V129
    0436 EXT_STMT
    0437 JMP 0010
    0438 EXT_STMT
    0439 T131 = PRE_INC CV3($top)
    0440 V133 = NEW 2 string("MessagePack\State")
    0441 SEND_VAL_EX int(1) 1
    0442 SEND_VAL_EX int(9) 2
    0443 DO_FCALL
    0444 ASSIGN_DIM CV2($stack) T131
    0445 OP_DATA V133
    0446 EXT_STMT
    0447 JMP 0010
    0448 EXT_STMT
    0449 T135 = PRE_INC CV3($top)
    0450 V137 = NEW 2 string("MessagePack\State")
    0451 SEND_VAL_EX int(1) 1
    0452 SEND_VAL_EX int(10) 2
    0453 DO_FCALL
    0454 ASSIGN_DIM CV2($stack) T135
    0455 OP_DATA V137
    0456 EXT_STMT
    0457 JMP 0010
    0458 EXT_STMT
    0459 T139 = PRE_INC CV3($top)
    0460 V141 = NEW 2 string("MessagePack\State")
    0461 SEND_VAL_EX int(1) 1
    0462 SEND_VAL_EX int(11) 2
    0463 DO_FCALL
    0464 ASSIGN_DIM CV2($stack) T139
    0465 OP_DATA V141
    0466 EXT_STMT
    0467 JMP 0010
    0468 EXT_STMT
    0469 T143 = PRE_INC CV3($top)
    0470 V145 = NEW 2 string("MessagePack\State")
    0471 SEND_VAL_EX int(1) 1
    0472 SEND_VAL_EX int(12) 2
    0473 DO_FCALL
    0474 ASSIGN_DIM CV2($stack) T143
    0475 OP_DATA V145
    0476 EXT_STMT
    0477 JMP 0010
    0478 EXT_STMT
    0479 T147 = PRE_INC CV3($top)
    0480 V149 = NEW 2 string("MessagePack\State")
    0481 SEND_VAL_EX int(1) 1
    0482 SEND_VAL_EX int(13) 2
    0483 DO_FCALL
    0484 ASSIGN_DIM CV2($stack) T147
    0485 OP_DATA V149
    0486 EXT_STMT
    0487 JMP 0010
    0488 EXT_STMT
    0489 T151 = PRE_INC CV3($top)
    0490 V153 = NEW 2 string("MessagePack\State")
    0491 SEND_VAL_EX int(1) 1
    0492 SEND_VAL_EX int(14) 2
    0493 DO_FCALL
    0494 ASSIGN_DIM CV2($stack) T151
    0495 OP_DATA V153
    0496 EXT_STMT
    0497 JMP 0010
    0498 EXT_STMT
    0499 T155 = PRE_INC CV3($top)
    0500 V157 = NEW 2 string("MessagePack\State")
    0501 SEND_VAL_EX int(1) 1
    0502 SEND_VAL_EX int(15) 2
    0503 DO_FCALL
    0504 ASSIGN_DIM CV2($stack) T155
    0505 OP_DATA V157
    0506 EXT_STMT
    0507 JMP 0010
    0508 EXT_STMT
    0509 INIT_STATIC_METHOD_CALL 2 (self) (exception) string("unpackUint8")
    0510 SEND_VAR_EX CV0($buffer) 1
    0511 SEND_VAR_EX CV1($offset) 2
    0512 V159 = DO_FCALL
    0513 ASSIGN CV6($length) V159
    0514 EXT_STMT
    0515 JMP 0763
    0516 EXT_STMT
    0517 INIT_STATIC_METHOD_CALL 2 (self) (exception) string("unpackUint16")
    0518 SEND_VAR_EX CV0($buffer) 1
    0519 SEND_VAR_EX CV1($offset) 2
    0520 V161 = DO_FCALL
    0521 ASSIGN CV6($length) V161
    0522 EXT_STMT
    0523 JMP 0763
    0524 EXT_STMT
    0525 INIT_STATIC_METHOD_CALL 2 (self) (exception) string("unpackUint32")
    0526 SEND_VAR_EX CV0($buffer) 1
    0527 SEND_VAR_EX CV1($offset) 2
    0528 V163 = DO_FCALL
    0529 ASSIGN CV6($length) V163
    0530 EXT_STMT
    0531 JMP 0763
    0532 EXT_STMT
    0533 INIT_STATIC_METHOD_CALL 2 (self) (exception) string("unpackFloat32")
    0534 SEND_VAR_EX CV0($buffer) 1
    0535 SEND_VAR_EX CV1($offset) 2
    0536 V165 = DO_FCALL
    0537 ASSIGN CV5($value) V165
    0538 EXT_STMT
    0539 JMP 0782
    0540 EXT_STMT
    0541 INIT_STATIC_METHOD_CALL 2 (self) (exception) string("unpackFloat64")
    0542 SEND_VAR_EX CV0($buffer) 1
    0543 SEND_VAR_EX CV1($offset) 2
    0544 V167 = DO_FCALL
    0545 ASSIGN CV5($value) V167
    0546 EXT_STMT
    0547 JMP 0782
    0548 EXT_STMT
    0549 INIT_STATIC_METHOD_CALL 2 (self) (exception) string("unpackUint8")
    0550 SEND_VAR_EX CV0($buffer) 1
    0551 SEND_VAR_EX CV1($offset) 2
    0552 V169 = DO_FCALL
    0553 ASSIGN CV5($value) V169
    0554 EXT_STMT
    0555 JMP 0782
    0556 EXT_STMT
    0557 INIT_STATIC_METHOD_CALL 2 (self) (exception) string("unpackUint16")
    0558 SEND_VAR_EX CV0($buffer) 1
    0559 SEND_VAR_EX CV1($offset) 2
    0560 V171 = DO_FCALL
    0561 ASSIGN CV5($value) V171
    0562 EXT_STMT
    0563 JMP 0782
    0564 EXT_STMT
    0565 INIT_STATIC_METHOD_CALL 2 (self) (exception) string("unpackUint32")
    0566 SEND_VAR_EX CV0($buffer) 1
    0567 SEND_VAR_EX CV1($offset) 2
    0568 V173 = DO_FCALL
    0569 ASSIGN CV5($value) V173
    0570 EXT_STMT
    0571 JMP 0782
    0572 EXT_STMT
    0573 INIT_METHOD_CALL 0 THIS string("unpackUint64")
    0574 V175 = DO_FCALL
    0575 ASSIGN CV5($value) V175
    0576 EXT_STMT
    0577 JMP 0782
    0578 EXT_STMT
    0579 INIT_STATIC_METHOD_CALL 2 (self) (exception) string("unpackInt8")
    0580 SEND_VAR_EX CV0($buffer) 1
    0581 SEND_VAR_EX CV1($offset) 2
    0582 V177 = DO_FCALL
    0583 ASSIGN CV5($value) V177
    0584 EXT_STMT
    0585 JMP 0782
    0586 EXT_STMT
    0587 INIT_STATIC_METHOD_CALL 2 (self) (exception) string("unpackInt16")
    0588 SEND_VAR_EX CV0($buffer) 1
    0589 SEND_VAR_EX CV1($offset) 2
    0590 V179 = DO_FCALL
    0591 ASSIGN CV5($value) V179
    0592 EXT_STMT
    0593 JMP 0782
    0594 EXT_STMT
    0595 INIT_STATIC_METHOD_CALL 2 (self) (exception) string("unpackInt32")
    0596 SEND_VAR_EX CV0($buffer) 1
    0597 SEND_VAR_EX CV1($offset) 2
    0598 V181 = DO_FCALL
    0599 ASSIGN CV5($value) V181
    0600 EXT_STMT
    0601 JMP 0782
    0602 EXT_STMT
    0603 INIT_STATIC_METHOD_CALL 2 (self) (exception) string("unpackInt64")
    0604 SEND_VAR_EX CV0($buffer) 1
    0605 SEND_VAR_EX CV1($offset) 2
    0606 V183 = DO_FCALL
    0607 ASSIGN CV5($value) V183
    0608 EXT_STMT
    0609 JMP 0782
    0610 EXT_STMT
    0611 INIT_STATIC_METHOD_CALL 2 (self) (exception) string("unpackUint8")
    0612 SEND_VAR_EX CV0($buffer) 1
    0613 SEND_VAR_EX CV1($offset) 2
    0614 V185 = DO_FCALL
    0615 ASSIGN CV6($length) V185
    0616 EXT_STMT
    0617 JMP 0763
    0618 EXT_STMT
    0619 INIT_STATIC_METHOD_CALL 2 (self) (exception) string("unpackUint16")
    0620 SEND_VAR_EX CV0($buffer) 1
    0621 SEND_VAR_EX CV1($offset) 2
    0622 V187 = DO_FCALL
    0623 ASSIGN CV6($length) V187
    0624 EXT_STMT
    0625 JMP 0763
    0626 EXT_STMT
    0627 INIT_STATIC_METHOD_CALL 2 (self) (exception) string("unpackUint32")
    0628 SEND_VAR_EX CV0($buffer) 1
    0629 SEND_VAR_EX CV1($offset) 2
    0630 V189 = DO_FCALL
    0631 ASSIGN CV6($length) V189
    0632 EXT_STMT
    0633 JMP 0763
    0634 EXT_STMT
    0635 T191 = PRE_INC CV3($top)
    0636 V193 = NEW 2 string("MessagePack\State")
    0637 SEND_VAL_EX int(1) 1
    0638 INIT_STATIC_METHOD_CALL 2 (self) (exception) string("unpackUint16")
    0639 SEND_VAR_EX CV0($buffer) 1
    0640 SEND_VAR_EX CV1($offset) 2
    0641 V194 = DO_FCALL
    0642 SEND_VAR_NO_REF_EX V194 2
    0643 DO_FCALL
    0644 ASSIGN_DIM CV2($stack) T191
    0645 OP_DATA V193
    0646 EXT_STMT
    0647 JMP 0010
    0648 EXT_STMT
    0649 T196 = PRE_INC CV3($top)
    0650 V198 = NEW 2 string("MessagePack\State")
    0651 SEND_VAL_EX int(1) 1
    0652 INIT_STATIC_METHOD_CALL 2 (self) (exception) string("unpackUint32")
    0653 SEND_VAR_EX CV0($buffer) 1
    0654 SEND_VAR_EX CV1($offset) 2
    0655 V199 = DO_FCALL
    0656 SEND_VAR_NO_REF_EX V199 2
    0657 DO_FCALL
    0658 ASSIGN_DIM CV2($stack) T196
    0659 OP_DATA V198
    0660 EXT_STMT
    0661 JMP 0010
    0662 EXT_STMT
    0663 T201 = PRE_INC CV3($top)
    0664 V203 = NEW 2 string("MessagePack\State")
    0665 SEND_VAL_EX int(2) 1
    0666 INIT_STATIC_METHOD_CALL 2 (self) (exception) string("unpackUint16")
    0667 SEND_VAR_EX CV0($buffer) 1
    0668 SEND_VAR_EX CV1($offset) 2
    0669 V204 = DO_FCALL
    0670 SEND_VAR_NO_REF_EX V204 2
    0671 DO_FCALL
    0672 ASSIGN_DIM CV2($stack) T201
    0673 OP_DATA V203
    0674 EXT_STMT
    0675 JMP 0010
    0676 EXT_STMT
    0677 T206 = PRE_INC CV3($top)
    0678 V208 = NEW 2 string("MessagePack\State")
    0679 SEND_VAL_EX int(2) 1
    0680 INIT_STATIC_METHOD_CALL 2 (self) (exception) string("unpackUint32")
    0681 SEND_VAR_EX CV0($buffer) 1
    0682 SEND_VAR_EX CV1($offset) 2
    0683 V209 = DO_FCALL
    0684 SEND_VAR_NO_REF_EX V209 2
    0685 DO_FCALL
    0686 ASSIGN_DIM CV2($stack) T206
    0687 OP_DATA V208
    0688 EXT_STMT
    0689 JMP 0010
    0690 EXT_STMT
    0691 INIT_METHOD_CALL 1 THIS string("unpackExtData")
    0692 SEND_VAL_EX int(1) 1
    0693 V211 = DO_FCALL
    0694 ASSIGN CV5($value) V211
    0695 EXT_STMT
    0696 JMP 0782
    0697 EXT_STMT
    0698 INIT_METHOD_CALL 1 THIS string("unpackExtData")
    0699 SEND_VAL_EX int(2) 1
    0700 V213 = DO_FCALL
    0701 ASSIGN CV5($value) V213
    0702 EXT_STMT
    0703 JMP 0782
    0704 EXT_STMT
    0705 INIT_METHOD_CALL 1 THIS string("unpackExtData")
    0706 SEND_VAL_EX int(4) 1
    0707 V215 = DO_FCALL
    0708 ASSIGN CV5($value) V215
    0709 EXT_STMT
    0710 JMP 0782
    0711 EXT_STMT
    0712 INIT_METHOD_CALL 1 THIS string("unpackExtData")
    0713 SEND_VAL_EX int(8) 1
    0714 V217 = DO_FCALL
    0715 ASSIGN CV5($value) V217
    0716 EXT_STMT
    0717 JMP 0782
    0718 EXT_STMT
    0719 INIT_METHOD_CALL 1 THIS string("unpackExtData")
    0720 SEND_VAL_EX int(16) 1
    0721 V219 = DO_FCALL
    0722 ASSIGN CV5($value) V219
    0723 EXT_STMT
    0724 JMP 0782
    0725 EXT_STMT
    0726 INIT_METHOD_CALL 1 THIS string("unpackExtData")
    0727 INIT_STATIC_METHOD_CALL 2 (self) (exception) string("unpackUint8")
    0728 SEND_VAR_EX CV0($buffer) 1
    0729 SEND_VAR_EX CV1($offset) 2
    0730 V221 = DO_FCALL
    0731 SEND_VAR_NO_REF_EX V221 1
    0732 V222 = DO_FCALL
    0733 ASSIGN CV5($value) V222
    0734 EXT_STMT
    0735 JMP 0782
    0736 EXT_STMT
    0737 INIT_METHOD_CALL 1 THIS string("unpackExtData")
    0738 INIT_STATIC_METHOD_CALL 2 (self) (exception) string("unpackUint16")
    0739 SEND_VAR_EX CV0($buffer) 1
    0740 SEND_VAR_EX CV1($offset) 2
    0741 V224 = DO_FCALL
    0742 SEND_VAR_NO_REF_EX V224 1
    0743 V225 = DO_FCALL
    0744 ASSIGN CV5($value) V225
    0745 EXT_STMT
    0746 JMP 0782
    0747 EXT_STMT
    0748 INIT_METHOD_CALL 1 THIS string("unpackExtData")
    0749 INIT_STATIC_METHOD_CALL 2 (self) (exception) string("unpackUint32")
    0750 SEND_VAR_EX CV0($buffer) 1
    0751 SEND_VAR_EX CV1($offset) 2
    0752 V227 = DO_FCALL
    0753 SEND_VAR_NO_REF_EX V227 1
    0754 V228 = DO_FCALL
    0755 ASSIGN CV5($value) V228
    0756 EXT_STMT
    0757 JMP 0782
    0758 EXT_STMT
    0759 INIT_STATIC_METHOD_CALL 1 string("MessagePack\Exception\UnpackingFailedException") string("unknownCode")
    0760 SEND_VAR_EX CV4($c) 1
    0761 V230 = DO_FCALL
    0762 THROW V230
    0763 EXT_STMT
    0764 T231 = ADD CV1($offset) CV6($length)
    0765 T232 = SUB T231 int(1)
    0766 T233 = ISSET_ISEMPTY_DIM_OBJ (isset) CV0($buffer) T232
    0767 T234 = BOOL_NOT T233
    0768 JMPZ T234 0773
    0769 EXT_STMT
    0770 V235 = NEW 0 string("MessagePack\Exception\InsufficientDataException")
    0771 DO_FCALL
    0772 THROW V235
    0773 EXT_STMT
    0774 INIT_FCALL 3 128 string("substr")
    0775 SEND_VAR CV0($buffer) 1
    0776 SEND_VAR CV1($offset) 2
    0777 SEND_VAR CV6($length) 3
    0778 V237 = DO_FCALL
    0779 ASSIGN CV5($value) V237
    0780 EXT_STMT
    0781 ASSIGN_OP (ADD) CV1($offset) CV6($length)
    0782 EXT_STMT
    0783 JMP 0839
    0784 EXT_STMT
    0785 T240 = FETCH_DIM_R CV2($stack) CV3($top)
    0786 ASSIGN CV7($state) T240
    0787 EXT_STMT
    0788 T242 = FETCH_OBJ_R CV7($state) string("type")
    0789 T243 = IS_IDENTICAL T242 int(1)
    0790 JMPZ T243 0798
    0791 EXT_STMT
    0792 V244 = FETCH_OBJ_W (dim write) CV7($state) string("value")
    0793 ASSIGN_DIM V244 NEXT
    0794 OP_DATA CV5($value)
    0795 EXT_STMT
    0796 PRE_INC_OBJ CV7($state) string("count")
    0797 JMP 0825
    0798 EXT_STMT
    0799 T247 = FETCH_OBJ_R CV7($state) string("type")
    0800 T248 = IS_IDENTICAL T247 int(2)
    0801 JMPZ T248 0811
    0802 EXT_STMT
    0803 ASSIGN_OBJ CV7($state) string("type")
    0804 OP_DATA int(3)
    0805 EXT_STMT
    0806 ASSIGN_OBJ CV7($state) string("key")
    0807 OP_DATA CV5($value)
    0808 EXT_STMT
    0809 JMP 0010
    0810 JMP 0825
    0811 EXT_STMT
    0812 T251 = FETCH_OBJ_R CV7($state) string("type")
    0813 T252 = IS_IDENTICAL T251 int(3)
    0814 JMPZ T252 0825
    0815 EXT_STMT
    0816 ASSIGN_OBJ CV7($state) string("type")
    0817 OP_DATA int(2)
    0818 EXT_STMT
    0819 T255 = FETCH_OBJ_R CV7($state) string("key")
    0820 V254 = FETCH_OBJ_W (dim write) CV7($state) string("value")
    0821 ASSIGN_DIM V254 T255
    0822 OP_DATA CV5($value)
    0823 EXT_STMT
    0824 PRE_INC_OBJ CV7($state) string("count")
    0825 EXT_STMT
    0826 T258 = FETCH_OBJ_R CV7($state) string("size")
    0827 T259 = FETCH_OBJ_R CV7($state) string("count")
    0828 T260 = IS_NOT_IDENTICAL T258 T259
    0829 JMPZ T260 0832
    0830 EXT_STMT
    0831 JMP 0010
    0832 EXT_STMT
    0833 UNSET_DIM CV2($stack) CV3($top)
    0834 EXT_STMT
    0835 PRE_DEC CV3($top)
    0836 EXT_STMT
    0837 T262 = FETCH_OBJ_R CV7($state) string("value")
    0838 ASSIGN CV5($value) T262
    0839 JMPNZ CV2($stack) 0784
    0840 EXT_STMT
    0841 RETURN CV5($value)
    0842 EXT_STMT
    0843 RETURN null
    
    opened by rybakit 9
  • Add seek/pos to buffer unpacker

    Add seek/pos to buffer unpacker

    In my case, I got a buff, which has several msgpack-ed parts.

    So I added seek/pos to my fork, and I write a simple script like:

    <?php
        $unpacker = new BufferUnpacker($content);
        $unpacker->seek(4);
    
        while ($unpacker->pos() >= 0) {
           $value = $unpacker->unpack();
            echo "=== Position=" . $unpacker->pos() . " ===\n";
            var_dump($value);
      }
    
    

    I was considering add a fseek() like seek(), but feeling not very useful to me, so I just added a simple one.

    opened by sskaje 7
  • PHP 8 support

    PHP 8 support

    Hi,

    I ran your tests with PHP 8, everything works. It seems like the only missing thing is the PHP Decimal Extension, I saw you already have created php-decimal/ext-decimal#43 about this matter on their repository. Unfortunately, it has been several months and we still don't have any answer from a maintainer. Maybe its time to go forward?

    I propose you to officially support PHP 8. We could add some phpDoc to the BIGINT_AS_DEC constant to tell users PHP 8 is not supported for the moment. We could also throw an exception if the user tries to use it and the Decimal extension is not detected, that way they are stopped from doing something stupid and forward compatibility is ensured because your users will not need to update your package to the latest version to start using Decimal once the extension is updated. Maybe this will require to release a major version to warn about the potential backward compatibility break?

    I know this is not ideal, but your package works with PHP 8 and it would be a shame to not make it available to all PHP versions. 😕

    opened by nesk 5
  • Do you know the folks doing the PHP C module?

    Do you know the folks doing the PHP C module?

    Hi! I'm trying to move a PR forward on the msgpack PHP C extension. Are you in touch with msgpack overall project management to help run this down? https://github.com/msgpack/msgpack-php/pull/124

    Is the community recommending a move away from the C module and towards this one natively in PHP now?

    opened by sodabrew 4
  • BufferUnpacker with Type transformers not decoding correctly

    BufferUnpacker with Type transformers not decoding correctly

    I'm having trouble decoding a message that has an extension in a field, for example, this is what I get with MessagePack\MessagePack::unpack($msg)

    Array
    (
        [timestamp] => MessagePack\Ext Object
            (
                [type] => 5
                [data] => binary data
            )
        [item] => Array
            (
                [0] => Array...
                [1] => Array...
                [2] => Array...
            )
        .... and so on
    

    I tried to use BufferUnpacker() with a Type transformer (as shown in #17 with small changes) but that generates a 0 epoch date and it fails to decode the other items properly.

    I can manually unpack the binary data:

        $data = MessagePack\MessagePack::unpack($msg);
        $timestamp = unpack('Jtimestamp', $data['timestamp']->data);    
        $date = \DateTimeImmutable::createFromFormat('U', $timestamp['timestamp']);
        echo $date->format('r') . PHP_EOL;
    

    Results in:

    Fri, 30 Nov 2018 14:46:50 +0000
    
    opened by tuaris 4
  • Use generators for unpackArray/unpackMap

    Use generators for unpackArray/unpackMap

    E.g.:

    private function unpackMapGenerator($size)
    {
        for ($i = $size; $i; $i--) {
            yield $this->unpack() => $this->unpack();
        }
    }
    
    enhancement question 
    opened by rybakit 4
  • tryUnpack - how do you know when to return while streaming

    tryUnpack - how do you know when to return while streaming

    When reading from an open socket how do you know if you read all the bits and pieces of the packed message so that you should return the data. I am looking for a mechanism to replace streaming like this: msgpack-php extension

    Here is what I tried, but it only ends in a loop that never returns, I need a stop, a way of knowing when the message is complete:

             stream_set_blocking($io, 0);
             $unpackedBlocks = null;
             $unpacker = new BufferUnpacker();
    
            while (!feof($io)) {
                $r = array($io);
                $n = null;
                stream_select($r, $n, $n, null);
                $read = fread($io, $size);
                if ($read === false) {
                    throw new MessagePackRPCNetworkException(error_get_last());
                }
                $unpacker->append($read);
                $unpackedBlocks = $unpacker->tryUnpack();
            }
    
            return $unpackedBlocks;
    
    opened by decebal 2
  • Installing without composer

    Installing without composer

    I do not have composer, and am simply hoping to use this code as a drop-in polyfill / substitute for the PHP msgpack extension (which I could not get to work) for my dev environment.

    How would I go about installing this without composer?

    TIA

    opened by CodeSmith32 1
  • Backslash internal functions

    Backslash internal functions

    $ php -v
    PHP 7.0.5 (cli) (built: Apr 23 2016 10:48:01) ( NTS )
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    

    php tests/bench.php:

    w/ backslash
    Total                            16.6728                      9.2367
    Total                            16.6830                      9.2885
    Total                            16.6466                      9.2815
    
    w/o backslash
    Total                            16.9423                      9.6915
    Total                            16.9368                      9.6767
    Total                            16.9260                      9.7047
    
    opened by rybakit 1
  • Fix bugs found by PHP-Fuzzer

    Fix bugs found by PHP-Fuzzer

    This PR

    • forbids non-int/string map keys (previously they were silently cast to int/string which could result in a warning Illegal offset type)
    • fixes checking the buffer size required to unpack Ext (previously the Ext "type" byte wasn't taken into account which could result in a notice Uninitialized string offset for extensions with zero-length data)
    • tweaks some tests
    • adds a target file for PHP-Fuzzer
    opened by rybakit 0
  • Add an ability to pack to single-precision floats

    Add an ability to pack to single-precision floats

    $packer = new Packer(Packer::FORCE_FLOAT); // Packer::FORCE_DOUBLE
    ...
    $packer->packFloat(3.14);
    $packer->packDouble(3.14);
    

    or

    $packer = new Packer(Packer::FORCE_FLOAT32); // Packer::FORCE_FLOAT64
    ...
    $packer->packFloat32(3.14);
    $packer->packFloat64(3.14);
    
    enhancement question 
    opened by rybakit 0
  • Use array_is_list() for detecting array/map

    Use array_is_list() for detecting array/map

    This will require bumping the minimum PHP version to 8.1 or implementing a polyfill. Given this new function, perhaps the FORCE_ARR, FORCE_MAP, and DETECT_ARR_MAP options are no longer as useful and can be removed.

    opened by rybakit 0
Releases(v0.9.1)
  • v0.9.1(Feb 16, 2022)

  • v0.9.0(Oct 25, 2021)

    • Moved the MessagePack\Ext class to MessagePack\Type\Ext
    • Moved the MessagePack\TypeTransformer\CanPack interface to MessagePack\CanPack
    • Moved the MessagePack\TypeTransformer\Extension interface to MessagePack\Extension
    • Introduced the MessagePack\CanBePacked interface, updated the MessagePack\Type\Map, MessagePack\Type\Bin and MessagePack\Type\Ext classes to implement the interface
    • Removed the obsolete MessagePack\TypeTransformer\MapTransformer and MessagePack\TypeTransformer\BinTransformer transformers, added MessagePack\TypeTransformer\TraversableTransformer
    • Overflowed map integer keys are now always unpacked to strings, even if the BIGINT_AS_GMP or BIGINT_AS_DEC unpacking option is set
    • Added more examples and improved existing ones
    • Added Psalm, a static analysis tool for PHP
    Source code(tar.gz)
    Source code(zip)
  • v0.8.0(Mar 18, 2021)

    • Made the PackOptions::FORCE_STR option the default
    • Micro-optimized the creation of GMP objects
    • Updated README and example scripts
    • Switched to GH actions
    Source code(tar.gz)
    Source code(zip)
  • v0.7.2(Dec 18, 2020)

  • v0.7.1(Dec 4, 2020)

    • Added PHP 8 support
    • Added MessagePack\TypeTransformer\StreamTransformer to pack stream resources into MP_BIN
    • Removed trailing dot from error messages
    Source code(tar.gz)
    Source code(zip)
  • v0.7.0(Jan 29, 2020)

    Added

    • BufferUnpacker::getRemainingCount()
    • BufferUnpacker::hasRemaining()
    • BufferUnpacker::release()
    • UnpackOptions::BIGINT_AS_DEC

    Removed

    • InsufficientDataException::unexpectedLength()
    • IntegerOverflowException
    • UnpackOptions::BIGINT_AS_EXCEPTION

    Changed

    • BufferUnpacker::tryUnpack() no longer releases the read buffer, to release the buffer use BufferUnpacker::release()

    Fixed

    • Fixed the BufferUnpacker constructor to accept UnpackOptions instead of PackOptions
    • Fixed checking the buffer size required to unpack Ext (previously the Ext "type" byte wasn't taken into account which could result in a notice Uninitialized string offset for extensions with zero-length data)
    • Forbade non-int/string map keys (previously they were silently cast to int/string which could result in a warning Illegal offset type)

    Misc

    • Added a target file for PHP-Fuzzer
    • Added .gitattributes
    • Switched default PHP version in Docker to 7.4
    • Applied minor optimizations
    Source code(tar.gz)
    Source code(zip)
  • v0.6.1(Oct 2, 2019)

  • v0.6.0(Oct 1, 2019)

    Added

    • Methods:
      • BufferUnpacker::extendWith()
      • BufferUnpacker::withBuffer()
      • BufferUnpacker::read()
      • Packer::extendWith()
    • Interfaces:
      • TypeTransformer\Extension
    • Classes:
      • Tests\Perf\Benchmark\PausableBenchmark

    Renamed

    • Type\BinaryType\Bin
    • TypeTransformer\BinaryTransformerTypeTransformer\BinTransformer
    • TypeTransformer\PackableTypeTransformer\CanPack

    Changed

    • BufferUnpacker::__construct() now accepts Extension[] $extensions as the third argument
    • Packer::__construct() now accepts CanPack[] $transformers as the second argument

    Removed

    • Methods:
      • BufferUnpacker::__clone() Cloning a BufferUnpacker object no longer resets the internal buffer, to get the old behavior use $unpacker = $unpacker->withBuffer('')
      • BufferUnpacker::registerTransformer()
      • Packer::registerTransformer()
    • Interfaces:
      • TypeTransformer\Unpackable
    Source code(tar.gz)
    Source code(zip)
  • v0.5.4(Jan 1, 2019)

  • v0.5.3(Jun 15, 2018)

  • v0.5.2(Jun 15, 2018)

  • v0.5.1(May 24, 2018)

  • v0.5.0(May 22, 2018)

    Added

    • The MessagePack\TypeTransformer\Unpackable interface
    • Tests for example scripts

    Removed

    • The MessagePack\TypeTransformer\Extension interface
    Source code(tar.gz)
    Source code(zip)
  • v0.4.1(May 18, 2018)

    Added

    • Methods:
      • MessagePack\PackOptions::isForceBinMode()
      • MessagePack\PackOptions::isForceMapMode()
      • MessagePack\UnpackOptions::isBigIntAsExceptionMode()

    Changed

    • Optimized the detection of maps during packing
    Source code(tar.gz)
    Source code(zip)
  • v0.4.0(May 13, 2018)

    This release drops support for old PHP versions and HHVM. The minimum PHP version requirement is 7.1.1.

    Added

    • Methods:
      • MessagePack\Exception\InsufficientDataException::unexpectedLength()
      • MessagePack\Exception\InvalidOptionException::outOfRange()
      • MessagePack\Exception\PackingFailedException::unsupportedType()
      • MessagePack\Exception\UnpackingFailedException::unknownCode()
      • MessagePack\Exception\UnpackingFailedException::unexpectedCode()
      • MessagePack\PackOptions::fromDefaults()
      • MessagePack\UnpackOptions::fromDefaults()
    • Typehits
    • More tests
    • More examples

    Changed

    • Method signatures:
      • MessagePack\Exception\IntegerOverflowException::__construct()
      • MessagePack\Exception\PackingFailedException::__construct()
      • MessagePack\Tests\Perf\Runner::__construct()
      • MessagePack\Tests\Perf\Runner::run()
    • Visibility:
      • MessagePack\Packer::UTF8_REGEX from public to private
    • Coding standards rules (.php_cs.dist)
    • Applied minor optimizations

    Removed

    • Classes:
      • MessagePack\Exception\InvalidCodeException
    • Methods:
      • MessagePack\Exception\InsufficientDataException::fromOffset()
      • MessagePack\Exception\InvalidOptionException::fromValidOptions()
    Source code(tar.gz)
    Source code(zip)
  • v0.3.1(Apr 18, 2018)

    Added

    • MessagePack\BufferUnpacker::__clone()

    Changed

    • Made MessagePack\Packer::registerTransformer() and MessagePack\BufferUnpacker::registerTransformer() fluent
    • Optimized MessagePack\Packer::pack() for nulls and bools
    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(Apr 15, 2018)

    Added

    • Classes

      • MessagePack\Exception\InvalidCodeException
      • MessagePack\Exception\InvalidOptionException
      • MessagePack\Type\Binary
      • MessagePack\Type\Map
      • MessagePack\TypeTransformer\BinaryTransformer
      • MessagePack\TypeTransformer\MapTransformer
      • MessagePack\MessagePack
      • MessagePack\PackOptions
      • MessagePack\UnpackOptions
    • Interfaces

      • MessagePack\TypeTransformer\Packable
      • MessagePack\TypeTransformer\Extension
    • Methods

      • MessagePack\BufferUnpacker::registerTransformer()
      • MessagePack\BufferUnpacker::unpackNil()
      • MessagePack\BufferUnpacker::unpackBool()
      • MessagePack\BufferUnpacker::unpackInt()
      • MessagePack\BufferUnpacker::unpackFloat()
      • MessagePack\BufferUnpacker::unpackArray()
      • MessagePack\BufferUnpacker::unpackArrayHeader()
      • MessagePack\BufferUnpacker::unpackMap()
      • MessagePack\BufferUnpacker::unpackMapHeader()
      • MessagePack\BufferUnpacker::unpackExt()
      • MessagePack\Packer::registerTransformer()
      • MessagePack\Packer::packArrayHeader()
      • MessagePack\Packer::packMapHeader()
    • Code examples

    • @slow and @pecl_comp groups of tests which can be assigned to the MP_BENCH_TESTS environment variable

    • PHP CS Fixer configuration file, .php_cs.dist

    Changed

    • Changed the signature of the following methods:
      • MessagePack\BufferUnpacker::__construct()
      • MessagePack\Packer::__construct()
      • MessagePack\Packer::packExt()
    • The MessagePack\Ext class was marked as final
    • Changed the return format of MessagePack\Tests\DataProvider::provideData()
    • Optimized unpacking empty strings, array and maps
    • Optimized working with extension types
    • Optimized working with type transformers

    Removed

    • Classes

      • MessagePack\Unpacker
      • MessagePack\TypeTransformer\Collection
    • Interfaces

      • MessagePack\TypeTransformer\TypeTransformer
    • Methods

      • MessagePack\BufferUnpacker::setTransformers()
      • MessagePack\BufferUnpacker::getTransformers()
      • MessagePack\BufferUnpacker::setIntOverflowMode()
      • MessagePack\BufferUnpacker::getIntOverflowMode()
      • MessagePack\Packer::setTransformers()
      • MessagePack\Packer::getTransformers()
      • MessagePack\Packer::setTypeDetectionMode()
      • MessagePack\Ext::getType()
      • MessagePack\Ext::getData()
    • Constants

      • MessagePack\BufferUnpacker::INT_AS_EXCEPTION
      • MessagePack\BufferUnpacker::INT_AS_STR
      • MessagePack\BufferUnpacker::INT_AS_GMP
      • MessagePack\Packer::FORCE_STR
      • MessagePack\Packer::FORCE_BIN
      • MessagePack\Packer::FORCE_ARR
      • MessagePack\Packer::FORCE_MAP
    Source code(tar.gz)
    Source code(zip)
  • v0.2.2(Mar 23, 2017)

    • Added named constructor for InsufficientDataException
    • Fixed properties initialization in BufferUnpackerTarget/PackerTarget constructors
    • Replaced is_double() with is_float()
    • Updated license year
    Source code(tar.gz)
    Source code(zip)
  • v0.2.1(Sep 27, 2016)

  • v0.2.0(Sep 24, 2016)

    Core

    • Added php7 support
    • Introduced type detection modes
    • Renamed MessagePack\Packer::packDouble() to MessagePack\Packer::packFloat()
    • Applied various performance optimizations

    Tests

    • Added more tests and php runtimes (php 7.0/7.1, hhvm 3.9/3.12/latest)
    • Renamed some benchmark targets, added new ones
    • Added tests/Perf/Filter/RegexpFilter.php, renamed tests/Perf/Filter/NameFilter.php to tests/Perf/Filter/ListFilter.php, tests/Perf/Benchmark/TimeBenchmark.php to tests/Perf/Benchmark/DurationBenchmark.php
    Source code(tar.gz)
    Source code(zip)
Owner
Eugene Leonovich
Eugene Leonovich
Dubbox now means Dubbo eXtensions, and it adds features like RESTful remoting, Kyro/FST serialization, etc to the Dubbo service framework.

Dubbox now means Dubbo eXtensions. If you know java, javax and dubbo, you know what dubbox is :) Dubbox adds features like RESTful remoting, Kyro/FST

当当 4.9k Dec 27, 2022
JSON <=> PHP8+ objects serialization / deserialization library

A simple library for JSON to PHP Objects conversions Often times, we interact with an API, or data source that returns JSON. PHP only offers the possi

Square 90 Dec 20, 2022
A pure PHP implementation of the open Language Server Protocol. Provides static code analysis for PHP for any IDE.

A pure PHP implementation of the open Language Server Protocol. Provides static code analysis for PHP for any IDE.

Felix Becker 1.1k Jan 4, 2023
Run your WP site on github pages, php innovation award winner https://www.phpclasses.org/package/12091-PHP-Make-a-WordPress-site-run-on-GitHub-pages.html

Gitpress Run wordpress directly on github pages Gitpress won the innovation award for may 2021 Read more about this https://naveen17797.github.io/gitp

naveen 13 Nov 18, 2022
Creates Packagist.org mirror site.

Packagist Mirror Creates your own packagist.org mirror site. Requirements PHP ^7.1.3 Installation Clone the repository Install dependencies: php compo

Indra Gunawan 32 Mar 30, 2020
Tool based on deployer.org to perform zero downtime deployments of Magento 2 projects

Magento 2 Deployer Plus Reliable fully-automated deployments tool for Magento 2. Zero downtime deployments on Magento versions >= 2.2 Automating your

Juan Alonso 194 Dec 27, 2022
A block-based child theme for WordPress.org, plus local environment

WordPress.org Block Theme A block-based child theme for WordPress.org, plus local environment. Once set up, this environment will contain some shared

WordPress 29 Dec 30, 2022
Columnar analytics for PHP - a pure PHP library to read and write simple columnar files in a performant way.

Columnar Analytics (in pure PHP) On GitHub: https://github.com/envoymediagroup/columna About the project What does it do? This library allows you to w

Envoy Media Group 2 Sep 26, 2022
A beautiful, fully open-source, tunneling service - written in pure PHP

Expose A completely open-source ngrok alternative - written in pure PHP. Documentation For installation instructions, in-depth usage and deployment de

Beyond Code 3.9k Jan 7, 2023
Neural Network in pure PHP

rn Neural Network in pure PHP - ML Machine Learning - AI Artificial Intelligence RED NEURONAL WHAT DO THIS LIBRARY IN PURE PHP OF ARTIFICIAL INTELLIGE

Rafael Martin Soto 6 May 31, 2022
A lightweight framework-agnostic library in pure PHP for part-of-speech tagging

N-ai php pos tagger A lightweight framework-agnostic library in pure PHP for part-of-speech tagging. Can be used for chatbots, personal assistants, ke

Giorgio Rey 8 Nov 8, 2022
A pure PHP library for reading and writing presentations documents

Branch Master : Branch Develop : PHPPresentation is a library written in pure PHP that provides a set of classes to write to different presentation fi

PHPOffice 1.2k Jan 2, 2023
APM pure Php package

Pure Php sample project is just a sample project and here is what I usualy do for each new Php project.

AmirHossein Mohammadi 6 Jul 25, 2022
A PHP component to convert HTML into a plain text format

html2text html2text is a very simple script that uses DOM methods to convert HTML into a format similar to what would be rendered by a browser - perfe

Jevon Wright 423 Dec 29, 2022
This is a library to serialize PHP variables in JSON format

This is a library to serialize PHP variables in JSON format. It is similar of the serialize() function in PHP, but the output is a string JSON encoded. You can also unserialize the JSON generated by this tool and have you PHP content back.

Zumba 118 Dec 12, 2022
A PHP wrapper around Libreoffice for converting documents from one format to another.

Document Converter A PHP wrapper around Libreoffice for converting documents from one format to another. For example: Microsoft Word to PDF OpenOffice

Lukas White 0 Jul 28, 2022
AnsibleBoy aims to use the Asnible `facts` as data, which can then be visualized in a table format

AnsibleBoy - Ansible Frontend Hub About AnsibleBoy aims to use the Ansible facts as data, which can then be visualized as a table ToDo (note that this

Ron 23 Jul 14, 2022
A proof-of-concept parser for the SMART Health Cards format.

SMART Health Cards parser A proof-of-concept parser for the SMART Health Cards format. This is not intended for production use. I just hacked this tog

Mikkel Paulson 55 Jul 31, 2022
It's MX Player API gives All Content in JSON format

?? MXPlayer API ?? ?? MXPlayer API Can get Streaming URLs and Other Data in JSON Format From mxplayer.in links for Streaming ?? How to Use : ?? Method

Techie Sneh 8 Nov 30, 2021