Igbinary is a drop in replacement for the standard php serializer.

Overview

igbinary

Build Status Build Status (Windows)

Igbinary is a drop in replacement for the standard php serializer. Instead of the time and space consuming textual representation used by PHP's serialize, igbinary stores php data structures in a compact binary form. Memory savings are significant when using memcached, APCu, or similar memory based storages for serialized data. The typical reduction in storage requirements are around 50%. The exact percentage depends on your data.

Unserialization performance is at least on par with the standard PHP serializer, and is much faster for repetitive data. Serialization performance depends on the igbinary.compact_strings option which enables duplicate string tracking. String are inserted to a hash table, which adds some overhead when serializing. In usual scenarios this does not have much of an impact, because the typical usage pattern is "serialize rarely, unserialize often". With the compact_strings option enabled, igbinary is usually a bit slower than the standard serializer. Without it, igbinary is a bit faster.

Features

  • Support for the same data types as the standard PHP serializer: null, bool, int, float, string, array and object.
  • __autoload & unserialize_callback_func
  • __sleep & __wakeup
  • __serialize & __unserialize (only used in php 7.4+)
  • Serializable -interface
  • Data portability between platforms (32/64bit, endianness)
  • Tested on Linux amd64, Linux ARM, Mac OSX x86, HP-UX PA-RISC and NetBSD sparc64
  • Hooks up to the APCu in-memory key-value store as a serialization handler.
  • Compatible with 7.0 – 8.0 (The older igbinary 2.x releases support 5.2 – 5.6, 7.0 – 7.3)

Implementation details

Storing complex PHP data structures such as arrays of associative arrays with the standard PHP serializer is not very space efficient. The main reasons of this inefficiency are listed below, in order of significance (at least in our applications):

  1. Array keys, property names, and class names are repeated redundantly.
  2. Numerical values are plain text.
  3. Human readability adds some overhead.

Igbinary uses two strategies to minimize the size of the serialized output.

  1. Repeated strings are stored only once (this also includes class and property names). Collections of objects benefit significantly from this. See the igbinary.compact_strings option.

  2. Integer values are stored in the smallest primitive data type available: 123 = int8_t, 1234 = int16_t, 123456 = int32_t ... and so on.

  3. ( Well, it is not human readable ;)

How to use

Add the following lines to your php.ini:

; Load igbinary extension
extension=igbinary.so

; Use igbinary as session serializer
session.serialize_handler=igbinary

; Enable or disable compacting of duplicate strings
; The default is On.
igbinary.compact_strings=On

; If uncommented, use igbinary as the serializer of APCu
; (APCu 5.1.10 or newer is strongly recommended)
;apc.serializer=igbinary

Then, in your php code, replace serialize and unserialize function calls with igbinary_serialize and igbinary_unserialize.

Installing

Linux

If PHP was installed through your package manager, the package manager may also contain prebuilt packages for igbinary (with a package name similar to php-igbinary).

  • The packages from some package managers and OS versions may be out of date and have known bugs. The latest release of igbinary is The Latest Stable Version

Igbinary may also be installed with the command pecl install igbinary (You will need to enable igbinary in php.ini)

Alternately, you may wish to build from source

MacOS

pecl install igbinary is the recommended installation method (You will need to enable igbinary in php.ini)

Alternately, you may wish to build from source.

Installing on Windows

Prebuilt DLLs can be downloaded from PECL.

If you are a contributor to/packager of igbinary, or need to build from source, see WINDOWS.md

Building from source

  1. phpize

  2. ./configure

    • With GCC: ./configure CFLAGS="-O2 -g" --enable-igbinary
    • With ICC (Intel C Compiler) ./configure CFLAGS=" -no-prec-div -O3 -xO -unroll2 -g" CC=icc --enable-igbinary
    • With clang: ./configure CC=clang CFLAGS="-O0 -g" --enable-igbinary
  3. make

  4. make test

  5. make install

  6. igbinary.so is installed to the default extension directory

Bugs & Contributions

Mailing list for bug reports and other development discussion can be found at http://groups.google.com/group/igbinary (no longer used)

File bug reports at https://github.com/igbinary/igbinary/issues

The preferred way to contribute is with pull requests. Feel free to fork this at http://github.com/igbinary/igbinary

See TESTING.md for advice for testing patches.

See TECH_NOTES.md for information about how igbinary is implemented

Utilizing in other extensions

Igbinary can be called from other extensions fairly easily. Igbinary installs its header file to ext/igbinary/igbinary.h. There are just two straightforward functions: igbinary_serialize and igbinary_unserialize. Look at igbinary.h for prototypes and usage.

Add PHP_ADD_EXTENSION_DEP(yourextension, igbinary) to your config.m4 in case someone wants to compile both of them statically into php.

Trivia

Where does the name "igbinary" come from? There was once a similar project called fbinary but it has disappeared from the Internet a long time ago. Its architecture wasn't particularly clean either. IG is an abbreviation for a Finnish social networking site IRC-Galleria (http://irc-galleria.net/)

Comments
  • Push a 2.0.1 release

    Push a 2.0.1 release

    Release this to fix https://github.com/igbinary/igbinary/issues/103 (issue discovered after the 2.0.0 release tag) https://github.com/igbinary/igbinary/pull/109 finishes changing the package.xml tags. After that is merged, push a tag for 2.0.1, create a github release, and create a pecl release.

    In the release (https://github.com/igbinary/igbinary/pulls?q=is%3Apr+is%3Aclosed+sort%3Aupdated-desc):

    • Stop checking for apc in php 7 builds: https://github.com/igbinary/igbinary/pull/108
    • Add 7.1 to Travis CI, exclude some matrix entries (unrelated):
    • Fix session.decode_handler=igbinary not calling __wakeup(): https://github.com/igbinary/igbinary/pull/106
    • Add myself to package.xml : https://github.com/igbinary/igbinary/pull/104
    • Reuse created zend_string instance when unserializing (https://github.com/igbinary/igbinary/pull/81)
    opened by TysonAndre 13
  • Stable release?

    Stable release?

    It's been a while since last stable release 1.2.3. Does it make sense to start preparing stable release 2.0.0 with php7 support? Current master can be as an alpha version

    opened by mente 12
  • Segfault with igbinary_unserialize() and php7

    Segfault with igbinary_unserialize() and php7

    Hi,

    I just built the igbinary7 branch (commit 2b7c703) with php-7.0.2, and ran a CLI script from my main app. Here's the output I got:

    Warning: igbinary_unserialize_ref: invalid reference in class.php on line X
    Erreur de segmentation
    

    Here is the offending line:

    return igbinary_unserialize($serialized_value);
    

    Please tell me if you need more details. I'm not sure I can build a small use case, as the example below works fine:

    $ gcc --version
    gcc (Debian 4.7.2-5) 4.7.2
    $ php70 -v
    PHP 7.0.2 (cli) (built: Jan 21 2016 22:50:36) ( NTS )
    Copyright (c) 1997-2015 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
    
    $ php70 -r "var_dump(igbinary_unserialize(igbinary_serialize('test')));"
    string(4) "test"
    
    opened by GuillaumeRossolini 12
  • References for simple types

    References for simple types

    Are there any plans to implement handling of references that are not objects or arrays?

    Currently handling of references to/among simple types (strings, numbers, booleans) differs from one provided by native PHP functions. Please consider following PHP code:

    $a = array("A");
    $a[1] = &$a[0];
    $a[2] = &$a[1];
    $a[3] = &$a[2];
    
    $php_ser = serialize($a);
    $php = unserialize($php_ser);
    $php[1] = "Z";
    debug_zval_dump($php);  
    
    $ig_ser = igbinary_serialize($a);
    $ig = igbinary_unserialize($ig_ser);
    $ig[1] = "Z";
    debug_zval_dump($ig);
    

    Results of this are (igbinary 1.1.2-dev, compact_strings=Off):

    array(4) refcount(2){
      [0]=>
      &string(1) "Z" refcount(4)
      [1]=>
      &string(1) "Z" refcount(4)
      [2]=>
      &string(1) "Z" refcount(4)
      [3]=>
      &string(1) "Z" refcount(4)
    }
    array(4) refcount(2){
      [0]=>
      &string(1) "A" refcount(1)
      [1]=>
      string(1) "Z" refcount(1)
      [2]=>
      &string(1) "A" refcount(1)
      [3]=>
      &string(1) "A" refcount(1)
    }
    

    As the output shows, references to simple type (in this case - "string") is not corectly serialized/unserialized by igbinary. By looking at igbinary.c it appears to my (untrained to internals of PHP) eye, that propper support for this would not be too hard to implement as "array" type already has this.

    Or maybe I have got somthing/everything terribly wrong?

    opened by kristsk 12
  • Release igbinary 2.0.2, 2.0.3 to pecl

    Release igbinary 2.0.2, 2.0.3 to pecl

    Need to merge https://github.com/igbinary/igbinary/pull/121 to master first.

    Also, are any of the other igbinary maintainers able to sponsor me for a PECL account request?

    igbinary project tasks 
    opened by TysonAndre 11
  • Improve

    Improve "igbinary_unserialize_header: unsupported version" message

    Try to detect if

    • wrong endianness
    • looks like data serialised with php serialize

    Note: Don't fallback, just inform about the possible cause. Silent fallbacks are dangerous.

    opened by phadej 11
  • Data corruption when serializing object containing objects and with `var_dump()`/`print_r()`

    Data corruption when serializing object containing objects and with `var_dump()`/`print_r()`

    Hi!

    Today I faced an issue when upgrading from PHP 7.3 to 7.4 on a project which use igbinary.

    When using var_dump() or print_r(), I'm having an issue with objects instances that can be the same where they should/can not be the same.

    I've opened an issue on Symfony repository (https://github.com/symfony/symfony/issues/38440) but @nicolas-grekas confirms that's related to igbinary and not Symfony, see https://github.com/Kocal/symfony-marshaller-or-cache-issue/pull/1. @Nyholm provided some dummy classes which also reproduce the issue, see https://github.com/symfony/symfony/issues/38440#issuecomment-704383897, this way we can exclude the Symfony Mailer/Mime classes from being part of the issue.

    How to reproduce

    1. clone https://github.com/Kocal/symfony-marshaller-or-cache-issue
    2. use PHP 7.4 with igbinary 3.1.5
    3. run php reproducer.php, notice the last bool(true) when var_dump($messageEvents) is not commented: 2020-10-06_20-21
    4. comment var_dump($messageEvents) from line 14
    5. run php reproducer.php, notice the last bool(false) when var_dump($messageEvents) is commented: 2020-10-06_20-22

    I expect the code $messageEvents->getEvents()[0]->getMessage()->getHeaders() === $messageEvents->getEvents()[1]->getMessage()->getHeaders() to equals false, since $messageEvents->getEvents()[0]->getMessage() and $messageEvents->getEvents()[1]->getMessage() are different Email instances, and new Headers instances are created when creating an Email.

    In the first place, without thinking about the reproducer, I saw the issue on my library SymfonyMailerTesting when trying to normalize an Email instance (comming from the Symfony Cache, which use the DefaultMarshaller which use igbinary). I don't use var_dump() or print_r(), but traversing Email's properties to normalize it... so maybe the issue is related to object properties traversing?

    Do you know what can happens here? Thanks!

    bug 
    opened by Kocal 10
  • Out of memory when unserializing in php 5.x

    Out of memory when unserializing in php 5.x

    I have serialised a bunch tree structure per php source code and when reading them back I get PHP Fatal error running out of memory. Here is one such file: https://www.dropbox.com/s/e423u3xrqa9o274/Variable.php.cache?dl=0

    Using this file with the below code (to mimic the problem I get) results in out of memory.

    <?php
    $cache_filename = $argv[1];
    $data = file_get_contents($cache_filename);
    $i = 0;
    while (true) {
      $tree = igbinary_unserialize($data);
      echo $i++, PHP_EOL;
    }
    
    bug php5 
    opened by grom358 10
  • HHVM compatible release?

    HHVM compatible release?

    I apologise if this is bad form, but is there any plan on making an HHVM-compatible version? Just a port of the C code to PHP would suffice, as long as it was binary compatible with the output from the PHP extension. Not having a shared performant serializer between HHVM and vanilla PHP is not fun :)

    feature request 
    opened by davesidious 10
  • igbinary_unserialize_header: unsupported version

    igbinary_unserialize_header: unsupported version

    Hi!

    I have installed igbinary 1.1.1 from PECL, configured it as serializer for session.serialize_handler in php.ini so that it is shown in phpinfo(). The change was tested - so far everything is fine, but on live server, I can see warnings like this:

    [27-Dec-2012 09:10:23 UTC] PHP Warning: igbinary_unserialize_header: unsupported version: 1346458177, should be 1 or 2 in /opt/webapps/v1.0.3/includes/dispatcher.php on line 73 [27-Dec-2012 09:10:23 UTC] PHP Warning: session_start(): Trying to destroy uninitialized session in /opt/webapps/v1.0.3/includes/dispatcher.php on line 73 [27-Dec-2012 09:10:23 UTC] PHP Warning: session_start(): Failed to decode session object. Session has been destroyed in /opt/webapps/v1.0.3/includes/dispatcher.php on line 73

    These messages appear not all the time - session_start() from line 73 worked for me during tests.

    What would be the solution?

    PS I have Nginx 1.2.3, php5-fpm 5.3.10-1ubuntu3.4

    pending requester response 
    opened by r8or0pz 10
  • Warnings (with php 8.1.2 and multi-byte characters, saving igbinary_serialize to a file): `igbinary_unserialize: received more data to unserialize than expected`, `igbinary_unserialize_chararray: end-of-data`

    Warnings (with php 8.1.2 and multi-byte characters, saving igbinary_serialize to a file): `igbinary_unserialize: received more data to unserialize than expected`, `igbinary_unserialize_chararray: end-of-data`

    1.) Since updating to php 8.1 I am encountering error thrown by function igbinary_unserialize of this type:

    igbinary_unserialize: received more data to unserialize than expected
    

    ... and

    igbinary_unserialize_chararray: end-of-data
    

    These errors occur only when the serialised string contains a critical (number of) multibyte characters. I must stress that igbinary appears to work fine for session serialisation (which includes these multibyte characters).

    2.) I tried installing igbinary from source and this failed. Again, I have php 8.1.2 installed, but igbinary thinks I am using php 7.

    config.log

    This file contains any messages produced by compilers while
    running configure, to aid debugging if configure makes a mistake.
    
    It was created by configure, which was
    generated by GNU Autoconf 2.69.  Invocation command line was
    
      $ ./configure CFLAGS=-O2 -g --enable-igbinary
    
    ## --------- ##
    ## Platform. ##
    ## --------- ##
    
    hostname = REDACTED
    uname -m = x86_64
    uname -r = 5.4.0-97-generic
    uname -s = Linux
    uname -v = #110-Ubuntu SMP Thu Jan 13 18:22:13 UTC 2022
    
    /usr/bin/uname -p = x86_64
    /bin/uname -X     = unknown
    
    /bin/arch              = x86_64
    /usr/bin/arch -k       = unknown
    /usr/convex/getsysinfo = unknown
    /usr/bin/hostinfo      = unknown
    /bin/machine           = unknown
    /usr/bin/oslevel       = unknown
    /bin/universe          = unknown
    
    PATH: /usr/local/sbin
    PATH: /usr/local/bin
    PATH: /usr/sbin
    PATH: /usr/bin
    PATH: /sbin
    PATH: /bin
    PATH: /usr/games
    PATH: /usr/local/games
    PATH: /snap/bin
    PATH: /usr/local/ssl/bin
    
    
    ## ----------- ##
    ## Core tests. ##
    ## ----------- ##
    
    configure:2404: checking for grep that handles long lines and -e
    configure:2462: result: /usr/bin/grep
    configure:2467: checking for egrep
    configure:2529: result: /usr/bin/grep -E
    configure:2534: checking for a sed that does not truncate output
    configure:2598: result: /usr/bin/sed
    configure:2737: checking for pkg-config
    configure:2755: found /usr/bin/pkg-config
    configure:2767: result: /usr/bin/pkg-config
    configure:2792: checking pkg-config is at least version 0.9.0
    configure:2795: result: yes
    configure:2857: checking for cc
    configure:2873: found /usr/bin/cc
    configure:2884: result: cc
    configure:2915: checking for C compiler version
    configure:2924: cc --version >&5
    cc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
    Copyright (C) 2019 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    configure:2935: $? = 0
    configure:2924: cc -v >&5
    Using built-in specs.
    COLLECT_GCC=cc
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
    OFFLOAD_TARGET_NAMES=nvptx-none:hsa
    OFFLOAD_TARGET_DEFAULT=1
    Target: x86_64-linux-gnu
    Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
    Thread model: posix
    gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) 
    configure:2935: $? = 0
    configure:2924: cc -V >&5
    cc: error: unrecognized command line option '-V'
    cc: fatal error: no input files
    compilation terminated.
    configure:2935: $? = 1
    configure:2924: cc -qversion >&5
    cc: error: unrecognized command line option '-qversion'; did you mean '--version'?
    cc: fatal error: no input files
    compilation terminated.
    configure:2935: $? = 1
    configure:2955: checking whether the C compiler works
    configure:2977: cc -O2 -g   conftest.c  >&5
    configure:2981: $? = 0
    configure:3029: result: yes
    configure:3032: checking for C compiler default output file name
    configure:3034: result: a.out
    configure:3040: checking for suffix of executables
    configure:3047: cc -o conftest -O2 -g   conftest.c  >&5
    configure:3051: $? = 0
    configure:3073: result: 
    configure:3095: checking whether we are cross compiling
    configure:3103: cc -o conftest -O2 -g   conftest.c  >&5
    configure:3107: $? = 0
    configure:3114: ./conftest
    configure:3118: $? = 0
    configure:3106: result: no
    configure:3111: checking for suffix of object files
    configure:3133: cc -c -O2 -g  conftest.c >&5
    configure:3137: $? = 0
    configure:3158: result: o
    configure:3162: checking whether we are using the GNU C compiler
    configure:3181: cc -c -O2 -g  conftest.c >&5
    configure:3181: $? = 0
    configure:3190: result: yes
    configure:3199: checking whether cc accepts -g
    configure:3219: cc -c -g  conftest.c >&5
    configure:3219: $? = 0
    configure:3260: result: yes
    configure:3277: checking for cc option to accept ISO C89
    configure:3340: cc  -c -O2 -g  conftest.c >&5
    configure:3340: $? = 0
    configure:3353: result: none needed
    configure:3379: checking how to run the C preprocessor
    configure:3410: cc -E  conftest.c
    configure:3410: $? = 0
    configure:3424: cc -E  conftest.c
    conftest.c:9:10: fatal error: ac_nonexistent.h: No such file or directory
        9 | #include <ac_nonexistent.h>
          |          ^~~~~~~~~~~~~~~~~~
    compilation terminated.
    configure:3424: $? = 1
    configure: failed program was:
    | /* confdefs.h */
    | #define PACKAGE_NAME ""
    | #define PACKAGE_TARNAME ""
    | #define PACKAGE_VERSION ""
    | #define PACKAGE_STRING ""
    | #define PACKAGE_BUGREPORT ""
    | #define PACKAGE_URL ""
    | /* end confdefs.h.  */
    | #include <ac_nonexistent.h>
    configure:3449: result: cc -E
    configure:3469: cc -E  conftest.c
    configure:3469: $? = 0
    configure:3483: cc -E  conftest.c
    conftest.c:9:10: fatal error: ac_nonexistent.h: No such file or directory
        9 | #include <ac_nonexistent.h>
          |          ^~~~~~~~~~~~~~~~~~
    compilation terminated.
    configure:3483: $? = 1
    configure: failed program was:
    | /* confdefs.h */
    | #define PACKAGE_NAME ""
    | #define PACKAGE_TARNAME ""
    | #define PACKAGE_VERSION ""
    | #define PACKAGE_STRING ""
    | #define PACKAGE_BUGREPORT ""
    | #define PACKAGE_URL ""
    | /* end confdefs.h.  */
    | #include <ac_nonexistent.h>
    configure:3514: checking for icc
    configure:3523: result: no
    configure:3537: checking for suncc
    configure:3546: result: no
    configure:3564: checking for system library directory
    configure:3579: result: lib
    configure:3586: checking if compiler supports -Wl,-rpath,
    configure:3605: cc -o conftest -O2 -g   conftest.c -Wl,-rpath,/usr/lib  >&5
    configure:3605: $? = 0
    configure:3615: result: yes
    configure:3665: checking build system type
    configure:3679: result: x86_64-pc-linux-gnu
    configure:3699: checking host system type
    configure:3712: result: x86_64-pc-linux-gnu
    configure:3732: checking target system type
    configure:3745: result: x86_64-pc-linux-gnu
    configure:3848: checking for PHP prefix
    configure:3850: result: /usr
    configure:3852: checking for PHP includes
    configure:3854: result: -I/usr/include/php/20210902 -I/usr/include/php/20210902/main -I/usr/include/php/20210902/TSRM -I/usr/include/php/20210902/Zend -I/usr/include/php/20210902/ext -I/usr/include/php/20210902/ext/date/lib
    configure:3856: checking for PHP extension directory
    configure:3858: result: /usr/lib/php/20210902
    configure:3860: checking for PHP installed headers prefix
    configure:3862: result: /usr/include/php/20210902
    configure:3865: checking if debug is enabled
    configure:3891: result: no
    configure:3894: checking if zts is enabled
    configure:3920: result: no
    configure:3988: checking for gawk
    configure:4005: found /usr/bin/gawk
    configure:4016: result: gawk
    configure:4064: checking whether to enable igbinary support
    configure:4103: result: yes, shared
    configure:4110: checking for ANSI C header files
    configure:4130: cc -c -O2 -g  conftest.c >&5
    configure:4130: $? = 0
    configure:4203: cc -o conftest -O2 -g   conftest.c  >&5
    configure:4203: $? = 0
    configure:4203: ./conftest
    configure:4203: $? = 0
    configure:4214: result: yes
    configure:4227: checking for sys/types.h
    configure:4227: cc -c -O2 -g  conftest.c >&5
    configure:4227: $? = 0
    configure:4227: result: yes
    configure:4227: checking for sys/stat.h
    configure:4227: cc -c -O2 -g  conftest.c >&5
    configure:4227: $? = 0
    configure:4227: result: yes
    configure:4227: checking for stdlib.h
    configure:4227: cc -c -O2 -g  conftest.c >&5
    configure:4227: $? = 0
    configure:4227: result: yes
    configure:4227: checking for string.h
    configure:4227: cc -c -O2 -g  conftest.c >&5
    configure:4227: $? = 0
    configure:4227: result: yes
    configure:4227: checking for memory.h
    configure:4227: cc -c -O2 -g  conftest.c >&5
    configure:4227: $? = 0
    configure:4227: result: yes
    configure:4227: checking for strings.h
    configure:4227: cc -c -O2 -g  conftest.c >&5
    configure:4227: $? = 0
    configure:4227: result: yes
    configure:4227: checking for inttypes.h
    configure:4227: cc -c -O2 -g  conftest.c >&5
    configure:4227: $? = 0
    configure:4227: result: yes
    configure:4227: checking for stdint.h
    configure:4227: cc -c -O2 -g  conftest.c >&5
    configure:4227: $? = 0
    configure:4227: result: yes
    configure:4227: checking for unistd.h
    configure:4227: cc -c -O2 -g  conftest.c >&5
    configure:4227: $? = 0
    configure:4227: result: yes
    configure:4241: checking stdbool.h usability
    configure:4241: cc -c -O2 -g  conftest.c >&5
    configure:4241: $? = 0
    configure:4241: result: yes
    configure:4241: checking stdbool.h presence
    configure:4241: cc -E  conftest.c
    configure:4241: $? = 0
    configure:4241: result: yes
    configure:4241: checking for stdbool.h
    configure:4241: result: yes
    configure:4255: checking stddef.h usability
    configure:4255: cc -c -O2 -g  conftest.c >&5
    configure:4255: $? = 0
    configure:4255: result: yes
    configure:4255: checking stddef.h presence
    configure:4255: cc -E  conftest.c
    configure:4255: $? = 0
    configure:4255: result: yes
    configure:4255: checking for stddef.h
    configure:4255: result: yes
    configure:4269: checking for stdint.h
    configure:4269: result: yes
    configure:4282: checking PHP version
    configure:4308: cc -c -O2 -g  conftest.c >&5
    configure:4308: $? = 0
    configure:4310: result: PHP 7
    configure:4320: checking for APCu includes
    configure:4330: result: not found
    configure:4338: checking size of long
    configure:4343: cc -o conftest -O2 -g   conftest.c  >&5
    configure:4343: $? = 0
    configure:4343: ./conftest
    configure:4343: $? = 0
    configure:4357: result: 8
    configure:4368: checking compiler type
    configure:4377: result: gcc
    configure:4764: checking how to print strings
    configure:4791: result: printf
    configure:4812: checking for a sed that does not truncate output
    configure:4876: result: /usr/bin/sed
    configure:4894: checking for fgrep
    configure:4956: result: /usr/bin/grep -F
    configure:4991: checking for ld used by cc
    configure:5058: result: /usr/bin/ld
    configure:5065: checking if the linker (/usr/bin/ld) is GNU ld
    configure:5080: result: yes
    configure:5092: checking for BSD- or MS-compatible name lister (nm)
    configure:5146: result: /usr/bin/nm -B
    configure:5276: checking the name lister (/usr/bin/nm -B) interface
    configure:5283: cc -c -O2 -g  conftest.c >&5
    configure:5286: /usr/bin/nm -B "conftest.o"
    configure:5289: output
    0000000000000000 B some_variable
    configure:5290: result: BSD nm
    configure:5293: checking whether ln -s works
    configure:5297: result: yes
    configure:5305: checking the maximum length of command line arguments
    configure:5436: result: 1572864
    configure:5484: checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format
    configure:5524: result: func_convert_file_noop
    configure:5531: checking how to convert x86_64-pc-linux-gnu file names to toolchain format
    configure:5551: result: func_convert_file_noop
    configure:5558: checking for /usr/bin/ld option to reload object files
    configure:5565: result: -r
    configure:5639: checking for objdump
    configure:5655: found /usr/bin/objdump
    configure:5666: result: objdump
    configure:5698: checking how to recognize dependent libraries
    configure:5898: result: pass_all
    configure:5983: checking for dlltool
    configure:6013: result: no
    configure:6043: checking how to associate runtime and link libraries
    configure:6070: result: printf %s\n
    configure:6130: checking for ar
    configure:6146: found /usr/bin/ar
    configure:6157: result: ar
    configure:6194: checking for archiver @FILE support
    configure:6211: cc -c -O2 -g  conftest.c >&5
    configure:6211: $? = 0
    configure:6214: ar cr libconftest.a @conftest.lst >&5
    configure:6217: $? = 0
    configure:6222: ar cr libconftest.a @conftest.lst >&5
    ar: conftest.o: No such file or directory
    configure:6225: $? = 1
    configure:6224: result: @
    configure:6282: checking for strip
    configure:6298: found /usr/bin/strip
    configure:6309: result: strip
    configure:6381: checking for ranlib
    configure:6397: found /usr/bin/ranlib
    configure:6408: result: ranlib
    configure:6485: checking for gawk
    configure:6512: result: gawk
    configure:6552: checking command to parse /usr/bin/nm -B output from cc object
    configure:6705: cc -c -O2 -g  conftest.c >&5
    configure:6708: $? = 0
    configure:6712: /usr/bin/nm -B conftest.o | sed -n -e 's/^.*[   ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[   ][   ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' > conftest.nm
    configure:6778: cc -o conftest -O2 -g   conftest.c conftstm.o >&5
    configure:6781: $? = 0
    configure:6819: result: ok
    configure:6866: checking for sysroot
    configure:6896: result: no
    configure:6903: checking for a working dd
    configure:6941: result: /usr/bin/dd
    configure:6945: checking how to truncate binary pipes
    configure:6960: result: /usr/bin/dd bs=4096 count=1
    configure:7096: cc -c -O2 -g  conftest.c >&5
    configure:7099: $? = 0
    configure:7289: checking for mt
    configure:7305: found /usr/bin/mt
    configure:7316: result: mt
    configure:7339: checking if mt is a manifest tool
    configure:7345: mt '-?'
    configure:7353: result: no
    configure:8027: checking for dlfcn.h
    configure:8027: cc -c -O2 -g  conftest.c >&5
    configure:8027: $? = 0
    configure:8027: result: yes
    configure:8283: checking for objdir
    configure:8298: result: .libs
    configure:8562: checking if cc supports -fno-rtti -fno-exceptions
    configure:8580: cc -c -O2 -g  -fno-rtti -fno-exceptions conftest.c >&5
    cc1: warning: command line option '-fno-rtti' is valid for C++/D/ObjC++ but not for C
    configure:8584: $? = 0
    configure:8597: result: no
    configure:8961: checking for cc option to produce PIC
    configure:8968: result: -fPIC -DPIC
    configure:8976: checking if cc PIC flag -fPIC -DPIC works
    configure:8994: cc -c -O2 -g  -fPIC -DPIC -DPIC conftest.c >&5
    configure:8998: $? = 0
    configure:9011: result: yes
    configure:9040: checking if cc static flag -static works
    configure:9068: result: yes
    configure:9083: checking if cc supports -c -o file.o
    configure:9104: cc -c -O2 -g  -o out/conftest2.o conftest.c >&5
    configure:9108: $? = 0
    configure:9130: result: yes
    configure:9138: checking if cc supports -c -o file.o
    configure:9185: result: yes
    configure:9218: checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries
    configure:10481: result: yes
    configure:10518: checking whether -lc should be explicitly linked in
    configure:10526: cc -c -O2 -g  conftest.c >&5
    configure:10529: $? = 0
    configure:10544: cc -shared  -fPIC -DPIC conftest.o  -v -Wl,-soname -Wl,conftest -o conftest 2\>\&1 \| /usr/bin/grep  -lc  \>/dev/null 2\>\&1
    configure:10547: $? = 0
    configure:10561: result: no
    configure:10721: checking dynamic linker characteristics
    configure:11302: cc -o conftest -O2 -g   -Wl,-rpath -Wl,/foo conftest.c  >&5
    configure:11302: $? = 0
    configure:11551: result: GNU/Linux ld.so
    configure:11673: checking how to hardcode library paths into programs
    configure:11698: result: immediate
    configure:12246: checking whether stripping libraries is possible
    configure:12251: result: yes
    configure:12286: checking if libtool supports shared libraries
    configure:12288: result: yes
    configure:12291: checking whether to build shared libraries
    configure:12316: result: yes
    configure:12319: checking whether to build static libraries
    configure:12323: result: no
    configure:9419: patching config.h.in
    configure:9430: creating ./config.status
    
    ## ---------------------- ##
    ## Running config.status. ##
    ## ---------------------- ##
    
    This file was extended by config.status, which was
    generated by GNU Autoconf 2.69.  Invocation command line was
    
      CONFIG_FILES    = 
      CONFIG_HEADERS  = 
      CONFIG_LINKS    = 
      CONFIG_COMMANDS = 
      $ ./config.status 
    
    on REDACTED
    
    config.status:889: creating config.h
    config.status:993: executing libtool commands
    
    ## ---------------- ##
    ## Cache variables. ##
    ## ---------------- ##
    
    ac_cv_build=x86_64-pc-linux-gnu
    ac_cv_c_compiler_gnu=yes
    ac_cv_env_CC_set=
    ac_cv_env_CC_value=
    ac_cv_env_CFLAGS_set=set
    ac_cv_env_CFLAGS_value='-O2 -g'
    ac_cv_env_CPPFLAGS_set=
    ac_cv_env_CPPFLAGS_value=
    ac_cv_env_CPP_set=
    ac_cv_env_CPP_value=
    ac_cv_env_LDFLAGS_set=
    ac_cv_env_LDFLAGS_value=
    ac_cv_env_LIBS_set=
    ac_cv_env_LIBS_value=
    ac_cv_env_LT_SYS_LIBRARY_PATH_set=
    ac_cv_env_LT_SYS_LIBRARY_PATH_value=
    ac_cv_env_PKG_CONFIG_LIBDIR_set=
    ac_cv_env_PKG_CONFIG_LIBDIR_value=
    ac_cv_env_PKG_CONFIG_PATH_set=
    ac_cv_env_PKG_CONFIG_PATH_value=
    ac_cv_env_PKG_CONFIG_set=
    ac_cv_env_PKG_CONFIG_value=
    ac_cv_env_build_alias_set=
    ac_cv_env_build_alias_value=
    ac_cv_env_host_alias_set=
    ac_cv_env_host_alias_value=
    ac_cv_env_target_alias_set=
    ac_cv_env_target_alias_value=
    ac_cv_header_dlfcn_h=yes
    ac_cv_header_inttypes_h=yes
    ac_cv_header_memory_h=yes
    ac_cv_header_stdbool_h=yes
    ac_cv_header_stdc=yes
    ac_cv_header_stddef_h=yes
    ac_cv_header_stdint_h=yes
    ac_cv_header_stdlib_h=yes
    ac_cv_header_string_h=yes
    ac_cv_header_strings_h=yes
    ac_cv_header_sys_stat_h=yes
    ac_cv_header_sys_types_h=yes
    ac_cv_header_unistd_h=yes
    ac_cv_host=x86_64-pc-linux-gnu
    ac_cv_objext=o
    ac_cv_path_EGREP='/usr/bin/grep -E'
    ac_cv_path_FGREP='/usr/bin/grep -F'
    ac_cv_path_GREP=/usr/bin/grep
    ac_cv_path_SED=/usr/bin/sed
    ac_cv_path_ac_pt_PKG_CONFIG=/usr/bin/pkg-config
    ac_cv_path_lt_DD=/usr/bin/dd
    ac_cv_prog_AWK=gawk
    ac_cv_prog_CPP='cc -E'
    ac_cv_prog_ac_ct_AR=ar
    ac_cv_prog_ac_ct_CC=cc
    ac_cv_prog_ac_ct_MANIFEST_TOOL=mt
    ac_cv_prog_ac_ct_OBJDUMP=objdump
    ac_cv_prog_ac_ct_RANLIB=ranlib
    ac_cv_prog_ac_ct_STRIP=strip
    ac_cv_prog_cc_c89=
    ac_cv_prog_cc_g=yes
    ac_cv_sizeof_long=8
    ac_cv_target=x86_64-pc-linux-gnu
    lt_cv_ar_at_file=@
    lt_cv_archive_cmds_need_lc=no
    lt_cv_deplibs_check_method=pass_all
    lt_cv_file_magic_cmd='$MAGIC_CMD'
    lt_cv_file_magic_test_file=
    lt_cv_ld_reload_flag=-r
    lt_cv_nm_interface='BSD nm'
    lt_cv_objdir=.libs
    lt_cv_path_LD=/usr/bin/ld
    lt_cv_path_NM='/usr/bin/nm -B'
    lt_cv_path_mainfest_tool=no
    lt_cv_prog_compiler_c_o=yes
    lt_cv_prog_compiler_pic='-fPIC -DPIC'
    lt_cv_prog_compiler_pic_works=yes
    lt_cv_prog_compiler_rtti_exceptions=no
    lt_cv_prog_compiler_static_works=yes
    lt_cv_prog_gnu_ld=yes
    lt_cv_sharedlib_from_linklib_cmd='printf %s\n'
    lt_cv_shlibpath_overrides_runpath=yes
    lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[   ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[   ][   ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'' | sed '\''/ __gnu_lto/d'\'''
    lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \(.*\) .*$/  {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/  {"\1", (void *) \&\1},/p'\'''
    lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='sed -n -e '\''s/^: \(.*\) .*$/  {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(lib.*\)$/  {"\1", (void *) \&\1},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/  {"lib\1", (void *) \&\1},/p'\'''
    lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\'''
    lt_cv_sys_global_symbol_to_import=
    lt_cv_sys_max_cmd_len=1572864
    lt_cv_to_host_file_cmd=func_convert_file_noop
    lt_cv_to_tool_file_cmd=func_convert_file_noop
    lt_cv_truncate_bin='/usr/bin/dd bs=4096 count=1'
    php_cv_cc_rpath=yes
    
    ## ----------------- ##
    ## Output variables. ##
    ## ----------------- ##
    
    AR='ar'
    AWK='gawk'
    BUILD_CC='cc'
    CC='cc'
    CFLAGS='-O2 -g'
    CONFIGURE_COMMAND=' '\''./configure'\''  '\''--enable-igbinary'\'''
    CONFIGURE_OPTIONS=' '\''--enable-igbinary'\'''
    CPP='cc -E'
    CPPFLAGS=' -DHAVE_CONFIG_H'
    DEFS='-DHAVE_CONFIG_H'
    DLLTOOL='false'
    DSYMUTIL=''
    DUMPBIN=''
    ECHO_C=''
    ECHO_N='-n'
    ECHO_T=''
    EGREP='/usr/bin/grep -E'
    EXEEXT=''
    FGREP='/usr/bin/grep -F'
    GREP='/usr/bin/grep'
    LD='/usr/bin/ld -m elf_x86_64'
    LDFLAGS=''
    LIBOBJS=''
    LIBS=''
    LIBTOOL='$(SHELL) $(top_builddir)/libtool'
    LIPO=''
    LN_S='ln -s'
    LTLIBOBJS=''
    LT_SYS_LIBRARY_PATH=''
    MANIFEST_TOOL=':'
    NM='/usr/bin/nm -B'
    NMEDIT=''
    OBJDUMP='objdump'
    OBJEXT='o'
    OTOOL64=''
    OTOOL=''
    PACKAGE_BUGREPORT=''
    PACKAGE_NAME=''
    PACKAGE_STRING=''
    PACKAGE_TARNAME=''
    PACKAGE_URL=''
    PACKAGE_VERSION=''
    PATH_SEPARATOR=':'
    PKG_CONFIG='/usr/bin/pkg-config'
    PKG_CONFIG_LIBDIR=''
    PKG_CONFIG_PATH=''
    RANLIB='ranlib'
    SED='/usr/bin/sed'
    SHELL='/bin/bash'
    SHLIB_DL_SUFFIX_NAME='so'
    SHLIB_SUFFIX_NAME='so'
    STRIP='strip'
    ac_ct_AR='ar'
    ac_ct_CC='cc'
    ac_ct_DUMPBIN=''
    bindir='${exec_prefix}/bin'
    build='x86_64-pc-linux-gnu'
    build_alias=''
    build_cpu='x86_64'
    build_os='linux-gnu'
    build_vendor='pc'
    datadir='${datarootdir}'
    datarootdir='${prefix}/share'
    docdir='${datarootdir}/doc/${PACKAGE}'
    dvidir='${docdir}'
    exec_prefix='$(prefix)'
    host='x86_64-pc-linux-gnu'
    host_alias='x86_64-pc-linux-gnu'
    host_cpu='x86_64'
    host_os='linux-gnu'
    host_vendor='pc'
    htmldir='${docdir}'
    includedir='${prefix}/include'
    infodir='${datarootdir}/info'
    libdir='${exec_prefix}/lib'
    libexecdir='${exec_prefix}/libexec'
    localedir='${datarootdir}/locale'
    localstatedir='${prefix}/var'
    mandir='${datarootdir}/man'
    oldincludedir='/usr/include'
    pdfdir='${docdir}'
    prefix='/usr'
    program_transform_name='s,x,x,'
    psdir='${docdir}'
    runstatedir='${localstatedir}/run'
    sbindir='${exec_prefix}/sbin'
    sharedstatedir='${prefix}/com'
    sysconfdir='${prefix}/etc'
    target='x86_64-pc-linux-gnu'
    target_alias=''
    target_cpu='x86_64'
    target_os='linux-gnu'
    target_vendor='pc'
    
    ## ----------- ##
    ## confdefs.h. ##
    ## ----------- ##
    
    /* confdefs.h */
    #define PACKAGE_NAME ""
    #define PACKAGE_TARNAME ""
    #define PACKAGE_VERSION ""
    #define PACKAGE_STRING ""
    #define PACKAGE_BUGREPORT ""
    #define PACKAGE_URL ""
    #define STDC_HEADERS 1
    #define HAVE_SYS_TYPES_H 1
    #define HAVE_SYS_STAT_H 1
    #define HAVE_STDLIB_H 1
    #define HAVE_STRING_H 1
    #define HAVE_MEMORY_H 1
    #define HAVE_STRINGS_H 1
    #define HAVE_INTTYPES_H 1
    #define HAVE_STDINT_H 1
    #define HAVE_UNISTD_H 1
    #define HAVE_STDBOOL_H 1
    #define HAVE_STDDEF_H 1
    #define HAVE_STDINT_H 1
    #define SIZEOF_LONG 8
    #define COMPILE_DL_IGBINARY 1
    #define HAVE_IGBINARY 1
    #define HAVE_DLFCN_H 1
    #define LT_OBJDIR ".libs/"
    
    configure: exit 0
    
    question working as intended 
    opened by jurisuk 9
  • Idea: New v3 opt-in serialization format to save space

    Idea: New v3 opt-in serialization format to save space

    • Use version \x00\x00\x00\x03 when this is stable
    • Avoid wasting space emitting key representations when array_is_list, i.e. when array keys are consecutive integers starting from 0 (have a fallback to start emitting unexpected keys with different values, if needed)
    • Allow more than one reference group to the same php value to be distinctly unserialized (e.g. $x = new stdClass; $y = $x; igbinary_serialize([&$x, &$x, &$y, &$y]);) (TODO: I forget the exact issue. Was that fixed already for the general case, or was the issue mixes of references and non-references)
    • Shorter representations for 1-character interned strings
    • Shorter representations for private properties of serialized class \x00$classname\x00$propname (and protected properties \x00*\x00$propname) (keys for parent classes and traits would be serialized normally)
    • Don't bother creating string ids for empty strings (EDIT: that's already part of the v2 design?) and 1-character strings that would already be interned in modern php versions (support reusing per-request in RINIT in igbinary itself if practical for php versions without ZSTR_CHAR guaranteed to exist)

    Opt-in can be done on per-serializer settings, to allow any migrations (e.g. redis, memcached) to be done separately.

    The unserializer should recognize v3 from the header

    Related to https://github.com/phpredis/phpredis/issues/2194

    Updates (October 19):

    Implementation is broken/incomplete and the v3 serialization format will be changed, found on the fork branch igbinary-v3-format

    • Shorter representations for very small non-negative integers (e.g. 0..7 can be X+(0..7)) is an idea I've seen in several other binary protocol formats, useful for ['key' => 1, 'x' => 0] where integers are used instead of booleans, or just from most integers being small (e.g. counts) when averaged out over common use cases
    • Still haven't implemented for serializing lists
    • Still haven't finished adding a way to represent creating a new reference group to the same php object for the general case
    • Haven't benchmarked this yet
    opened by TysonAndre 4
  • Floating-point serialization is platform-specific but works on modern standard computers

    Floating-point serialization is platform-specific but works on modern standard computers

    https://en.wikipedia.org/wiki/Endianness#Floating_point

    However, on modern standard computers (i.e., implementing IEEE 754), one may in practice safely assume that the endianness is the same for floating-point numbers as for integers, making the conversion straightforward regardless of data type

    igbinary_unserialize_double/igbinary_serialize_double

    Filing this to document it, though no bugs were reported

    /** Serializes double. */
    inline static int igbinary_serialize_double(struct igbinary_serialize_data *igsd, double d) {
    	union {
    		double d;
    		uint64_t u;
    	} u;
    
    	u.d = d;
    
    	return igbinary_serialize8_and_64(igsd, igbinary_type_double, u.u);
    }
    
    documentation 
    opened by TysonAndre 2
  • WIP - Example PR installing session handler without shared session module

    WIP - Example PR installing session handler without shared session module

    This depends on the proposal for PHP 8.2 (https://github.com/php/php-src/pull/7715) to allow safely registering native session serializers even if the session module isn't statically compiled into php (without crashing if the session module isn't loaded or is loaded in the wrong order, after the extension providing the serializer)

    opened by TysonAndre 0
  • Support php 8.1 igbinary session

    Support php 8.1 igbinary session

    Hi,

    Since upgrading to php 8.1, I have a regression with memcache.

    Having this config doesn't work anymore :

    extension = igbinary.so
    session.serialize_handler=igbinary
    

    We get an error :

    PHP Warning:  session_start(): Cannot find session serialization handler &quot;igbinary&quot; - session startup failed in /var/www/[...]/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php on line 149
    Uncaught PHP Exception RuntimeException: "Failed to start the session." at /var/www/[...]/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php line 150\n
    PHP Warning:  session_start(): Cannot find session serialization handler &quot;igbinary&quot; - session startup failed in /var/www/[...]/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php on line 149
    

    Php config :

    igbinary
    igbinary support => enabled
    igbinary version => 3.2.6
    igbinary APCu serializer ABI => no
    igbinary session support => no
    igbinary.compact_strings => On => On
    igbinary support => yes
    memcached.serializer => igbinary => igbinary
    

    It seems the ibinary sessioon support with php 8.1 is broken.

    If someone may provide a patch, that would be nice :)

    Best regards

    duplicate 
    opened by rapsys 4
  • Remove travis CI integration

    Remove travis CI integration

    It hasn't been ported from travis-ci.org to travis-ci.com, and I don't have the permissions to do so. (other maintainers do)

    With the large build matrix and valgrind this might quickly eat up open source minutes on free plans

    The build status on the README ~~is from 2 months ago~~ is removed for now

    opened by TysonAndre 0
Releases(3.2.12)
  • 3.2.12(Nov 7, 2022)

    • Fix symbol error seen in php 8.2.0 loading zend_class_unserialize_deny, due to failing to load a header defining a macro.

    NOTE: The PHP for Windows team is working on getting dlls built again for pecl extensions. Those should be used instead on Windows once they are available. See https://windows.php.net/

    DLLs for Windows can temporarily be found at https://github.com/igbinary/igbinary/actions/workflows/build_dlls.yml (under "Assets")

    Source code(tar.gz)
    Source code(zip)
  • 3.2.11(Nov 6, 2022)

    • Fix a bug that could prevent objects/arrays with reference cycles from being properly garbage collected.
    • Fix bugs in unserializing PHP references to values found in php 7.4 typed properties (#363)

    NOTE: The PHP for Windows team is working on getting dlls built again for pecl extensions. Those should be used instead on Windows once they are available. See https://windows.php.net/

    DLLs for Windows can temporarily be found at https://github.com/igbinary/igbinary/actions/workflows/build_dlls.yml (under "Assets")

    Source code(tar.gz)
    Source code(zip)
  • 3.2.10(Nov 6, 2022)

    • Add a macro that callers can use to check if igbinary will accept the header for data being unserialized.
    • Fix bug preventing the unserialization of data containing representations of strings larger than 4GB.

    NOTE: The PHP for Windows team is working on getting dlls built again for pecl extensions. Those should be used instead on Windows once they are available. See https://windows.php.net/

    DLLs for Windows can temporarily be found at https://github.com/igbinary/igbinary/actions/workflows/build_dlls.yml (under "Assets")

    Source code(tar.gz)
    Source code(zip)
  • 3.2.8(Oct 17, 2022)

    • Reduce excessive inlining to reduce shared library size.
    • Miscellaneous optimizations.
    • Update test expectations to handle changes to var_export output (fully qualified class names) in PHP 8.2.
    • Throw an Error when igbinary_unserialize would add dynamic properties to class definitions that forbid them in PHP 8.0+ (especially PHP 8.2 readonly classes)
    • Emit a deprecation notice when igbinary_unserialize() adds dynamic properties to a class without #[AllowDynamicProperties] in PHP 8.2. Doing that would become an Error in PHP 9.0.
    • Set up CI job to build dlls on https://github.com/igbinary/igbinary - at the moment, the infrastructure used by the Windows for php team has been broken for months.

    NOTE: The PHP for Windows team is working on getting dlls built again for pecl extensions. Those should be used instead on Windows once they are available. See https://windows.php.net/

    Source code(tar.gz)
    Source code(zip)
  • 3.2.7(Jan 18, 2022)

    • Update test expectations for php 8.2.0-dev. Add #[AllowDynamicProperties] Attribute to some tests to avoid notices.
    • In php 8.1+, make igbinary_unserialize check to see if an equivalent interned string already exists when unserializing object property names, array keys, and class names and use that instead of creating a brand new string. (This deliberately doesn't create a new interned string if one doesn't already exist.) (Before this change, igbinary would deduplicate strings when serializing, but would not check if strings were interned by PHP itself when unserializing)
    • Avoid debug build assertion failure for HT_ASSERT_RC1 the same way as PHP's unserialize - this is a case where ostensibly there are no other references to the array being unserialized.
    Source code(tar.gz)
    Source code(zip)
  • 3.2.6(Aug 11, 2021)

  • 3.2.5(Aug 7, 2021)

    • Fix change in behavior introduced in 3.2.2RC1 when unserializing arrays - the internal array pointer (for next(), key(), etc) pointed past the end of the array in php 7.0-7.2.
    Source code(tar.gz)
    Source code(zip)
  • 3.2.4(Jul 24, 2021)

    • Forbid serializing classes that deny serialization/unserialization (anonymous classes, CURLFile, etc.) even when subclasses implement '__serialize' and '__unserialize'
    Source code(tar.gz)
    Source code(zip)
  • 3.2.3(Jun 10, 2021)

    • Fix build for php 8.1 after changes to enum internals.
    • Update tests to suppress deprecations in php 8.1 and support run-tests.php changes in php 8.1
    • Don't emit a notice when unserialize_callback_func causes igbinary_unserialize to throw https://bugs.php.net/bug.php?id=81118
    Source code(tar.gz)
    Source code(zip)
  • 3.2.2(Apr 18, 2021)

    • Eliminate impossible/redundant checks.
    • Add a new type code for serialization and unserialization of PHP strings that are larger than 4GB.
    • Add additional checks for overflow when serializing extremely large data structures. (e.g. serializing more than 2**32 strings or 2**32 objects/references/arrays)
    • Support serializing and unserializing php 8.1 enums (can only be unserialized in php 8.1+)
    Source code(tar.gz)
    Source code(zip)
  • 3.2.2RC1(Jan 12, 2021)

    • Update php version check to allow igbinary to be statically built in PHP 8.0+
    • Fix bug in out of memory error handling in __sleep, slightly speed up serializing with __sleep.
    • Continue serializing remaining properties if a missing property name is returned from __sleep.
    • Speed up serializing by optimizing for the case where there is no memory manager override. When there is a memory manager override, only use that for allocating the string to return. (benchmarks/serialize-scalar-int.b.php showed a speedup from 0.22 to 0.18 seconds for repeated serialization of a single scalar, and from 0.186 to 0.180 seconds for benchmarks/serialize-stringarray.b.php for an array of strings)
    • Speed up unserializing arrays in php 7.2-8.0 by adding optimized code for finding the hash bucket of a string/integer key of an array, or creating a placeholder if it does not already exist.
    Source code(tar.gz)
    Source code(zip)
  • 3.2.1(Dec 27, 2020)

  • 3.2.0(Dec 26, 2020)

    • Use PHP's shared empty array instance when unserializing empty arrays in php 7.3+. (helps slightly with memory usage when repeatedly unserializing, when removing elements from arrays before unserializing them, or when serializing values including an empty array that was unserialized)
    • Emit a deprecation notice when serializing resources. PHP itself is converting many resources to objects that throw an Error on serialization attempts. Continue to represent resources as null in the serialized data.
    • Fix memory management bug when unserializing invalid data (duplicate properties in objects (e.g. from __sleep) or duplicate fields in arrays (impossible for valid data)).
    • Speed up calls to __serialize/__unserialize in php 8.0+.
    • Fix error messages for unserialize_callback_func: make messages properly refer to the autoload function.
    • Optimize unserializing alternative names for private/protected constants that were previously public.
    Source code(tar.gz)
    Source code(zip)
  • 3.1.6(Oct 8, 2020)

  • 3.1.6RC1(Oct 7, 2020)

  • 3.1.5(Sep 2, 2020)

    • Update unit test expectation to match behavior in php 8 due to changes in php's handling of cyclic references in arrays.
    • Support API changes in php 8.0.0beta3.
    Source code(tar.gz)
    Source code(zip)
  • 3.1.4(Aug 5, 2020)

  • 3.1.3(Aug 5, 2020)

    • Properly serialize reference groups of size 1 (these can be created by array_walk_recursive and other functions). Note that this does not fix the general case where values not being serialized are in the same reference group as a value being serialized.
    • PHP 8.0 compatibility fixes.
    Source code(tar.gz)
    Source code(zip)
    igbinary-3.1.3.tgz(70.36 KB)
  • 3.1.2(Jan 21, 2020)

  • 3.1.1(Jan 16, 2020)

  • 3.1.1a1(Jan 11, 2020)

    • Throw when an uninitialized php 7.4 typed property is included in the result of __sleep(), instead of emitting a notice and attempting to represent the unset/uninitialized value as null (#258). See https://bugs.php.net/bug.php?id=79002

      Uninitialized properties without types (from __sleep) continue to cause igbinary to emit notices and are represented as null.

    Source code(tar.gz)
    Source code(zip)
    igbinary-3.1.1a1.tgz(69.78 KB)
  • 3.1.0(Dec 27, 2019)

  • 3.1.0b4(Dec 20, 2019)

  • 3.1.0b3(Dec 10, 2019)

    • Skip over object properties that are uninitialized or unset when serializing, instead of serializing them as null. This is done to avoid Errors when unserializing their values for php 7.4 typed properties.
    Source code(tar.gz)
    Source code(zip)
  • 3.1.0b2(Dec 9, 2019)

  • 3.1.0b1(Dec 8, 2019)

    • Support php 7.4's __serialize/__unserialize the same way serialize()/unserialize() does. This deliberately only supports __serialize/__unserialize in php 7.4, to making switching to/from serialize()/unserialize() as straightforward as possible.
    Source code(tar.gz)
    Source code(zip)
  • 3.0.1(Mar 21, 2019)

  • 3.0.0(Feb 17, 2019)

  • 3.0.0a2(Feb 14, 2019)

Owner
Igbinary development
Igbinary development
YCOM Impersonate. Login as selected YCOM user πŸ§™β€β™‚οΈin frontend.

YCOM Impersonate Login as selected YCOM user in frontend. Features: Backend users with admin rights or YCOM[] rights, can be automatically logged in v

Friends Of REDAXO 17 Sep 12, 2022
A drop-in replacement for the Magento 2 checkout.

Clean Checkout for Magento 2 A drop-in replacement for the Magento 2 checkout. Features Modules The project is divided into several modules: Overall c

Daniel Sloof 275 Sep 14, 2022
A faster drop in replacement for bin/magento cache:clean with file watcher

"You know, hope is a mistake. If you can't fix what's broken, you'll, uh... you'll go insane." - Max Rockatansky Magento 2 Cache Clean A faster drop i

mage2tv 460 Dec 26, 2022
Coding-standard - Magento PHP CodeSniffer Coding Standard

ECG Magento Code Sniffer Coding Standard ECG Magento Code Sniffer Coding Standard is a set of rules and sniffs for PHP_CodeSniffer tool. It allows aut

Magento ECG 309 Jan 3, 2023
This component, based on the Symfony serializer and async-aws, is a human-readable and quick abstraction to easily store serialized objects in DynamoDB πŸš€.

DynamoDB Storable This component, based on the Symfony serializer and async-aws, is a human-readable and quick abstraction to easily store serialized

Matthieu W. 2 Jun 19, 2022
A powerful and pretty replacement for PHP's var_export()

Brick\VarExporter A powerful and pretty replacement for PHP's var_export(). Introduction PHP's var_export() function is a handy way to export a variab

Brick 145 Dec 23, 2022
This is a replacement dashboard for the Pisces Helium Miner

Pisces QoL Dashboard This is a replacement dashboard for the Pisces Helium Miner. The dashboard that ships with the Pisces P100 has a number of securi

null 42 Jun 16, 2022
Much improved replacement for Zend_Cache_Backend_File - works great with Magento!

Cm_Cache_Backend_File The stock Zend_Cache_Backend_File backend has extremely poor performance for cleaning by tags making it become unusable as the n

Colin Mollenhour 146 Aug 22, 2022
Easily create WooCommerce replacement orders for your customers.

Support Orders for WooCommerce Requires PHP: 7.0 WP requires at least: 5.7 WP tested up to: 5.7 WC requires at least: 5.6.0 WC tested up to: 5.8.0 Sta

DevPress 5 Feb 24, 2022
A replacement for Octoprint's UI and for multiple printers.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Andy Newhouse 1 Jan 19, 2022
Check modules in app/code and vendor for PHP 8 compatibility status - PHP_CodeSniffer & php-compatibility standard

M2 PHP version compatibility check How To use Requires PHP 7.3+ | PHP 8 This app will run PHP_CodeSniffer with phpcompatibility/php-compatibility on t

William Tran 24 Oct 13, 2022
The Workflow Package add Drag & Drop Workflows to your Laravel Application.

Workflows add Drag & Drop automation's to your Laravel application. The Workflow Package adds Drag & Drop Workflows to your Laravel Application. A Wor

42coders 196 Dec 29, 2022
DropItem3D - PocketMine-MP plugin to be able to see drop items realistic.

DropItem3D - PocketMine-MP plugin to be able to see drop items realistic.

ぼい 12 Jun 2, 2022
File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery

File Upload widget with multiple file selection, drag&drop support, progress bar, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.

Sebastian Tschan 31.1k Dec 30, 2022
Receiver is a drop-in webhook handling library for Laravel.

Receiver Receiver is a drop-in webhook handling library for Laravel. Webhooks are a powerful part of any API lifecycle. Receiver aims to make handling

Adam Campbell 270 Jan 6, 2023
This shell script and PHP file create a browseable HTML site from the Zig standard library source.

Browseable Zig standard library This shell script and PHP file create a browseable HTML site from the Zig standard library source. The idea is to inve

Dave Gauer 3 Mar 20, 2022
Psl is a standard library for PHP, inspired by hhvm/hsl

?? PHP Standard Library - a modern, consistent, centralized, well-typed, non-blocking set of APIs for PHP programmers

Saif Eddin Gmati 994 Jan 3, 2023
Magento 1.x Coding Standard

Magento Extension Quality Program Coding Standard ⚠️ Versions 3.0.0 and above of the MEQP Coding Standard are for Magento 1.x code only. To check Mage

Magento 224 Nov 29, 2022
Magento Coding Standard

Magento Coding Standard A set of Magento rules for PHP_CodeSniffer tool. Installation within a Magento 2 site To use within your Magento 2 project you

Magento 290 Dec 31, 2022