https://github.com/tysonandre/igbinary-hhvm
Work in Progress: Writing a native HHVM igbinary extension
https://github.com/tysonandre/igbinary-hhvm
igbinary
Last synced: 10 months ago
JSON representation
Work in Progress: Writing a native HHVM igbinary extension
- Host: GitHub
- URL: https://github.com/tysonandre/igbinary-hhvm
- Owner: TysonAndre
- License: other
- Created: 2016-07-18T01:36:57.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-10-20T06:05:47.000Z (over 8 years ago)
- Last Synced: 2025-01-25T18:31:12.438Z (about 1 year ago)
- Topics: igbinary
- Language: PHP
- Homepage:
- Size: 132 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
igbinary-hhvm
============
Requirements: HHVM >= 3.22 (May support earlier versions in future commits)
[](https://travis-ci.org/TysonAndre/igbinary-hhvm)
(Around 52 tests passing, 7 tests failing)
Native igbinary for HHVM. Mostly working, with some edge cases
# Functionality
So far, the following work:
- Scalars(Strings, Booleans, numbers)
- Arrays of scalars
- Objects
- Arrays/Objects containing duplicate values
- Integration with libraries using igbinary
- Objects with magic methods (`serialize`,`unserialize`,`__sleep`,`__wakeup`)
The following need more work:
- Cyclic data structures (May just be how `var_dump` represents it, need to investigate)
- Objects with magic methods (`__wakeup`, `__destruct`)
- References are still unsupported.
Haven't decided when/if igbinary should throw, convert to a regular value, etc.
External integration, such as with APCu, Memcached, Redis, session serializers, etc. won't work.
(without their sources being patched)
# Incompatibilities
References to PHP objects (as in `is_object`) are now intended to be treated as non-references to objects when serializing,
to match what the HHVM serializer does in php compatibility mode.
TODO: Check what the current compatibility mode is.
# Installation
```bash
$ git clone https://github.com/TysonAndre/igbinary-hhvm
$ cd igbinary-hhvm
$ hphpize && cmake . && make
$ cp igbinary.so /path/to/your/hhvm/ext/dir
```
`hhvm-dev` must be installed for hphpize to work.
# Testing
```bash
$ make test
```
To add ini options for a specific test (e.g. 042.php), add 042.php.ini?
Global test ini options are in [test/config.ini](test/config.ini)
To port test 00x.phpt to HHVM's test framework, split it up into 00x.php, 00x.php.skipif, 00x.php.expect (or 00x.php.expectf).
If there are any ini settings specific to that test, those go in 00x.php.ini?
# Authors
- Tyson Andre
Based on https://www.github.com/igbinary/igbinary