The php implementation for binpack.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bench
tests
CREDITS
LICENSE
README.md
bin_pack.c
bin_pack.h
bin_pack_debug.h
bin_pack_def.h
bin_pack_endian.h
config.m4
config.w32
do-make-test.sh
package.xml
php_binpack.c
php_binpack.h
run

README.md

binpack-php

The php implementation for binpack.

installation

  • by complie

    phpize
    ./configure
    make & make install
    
  • install from PECL

    BINPACK is an PECL extension, thus you can simply install it by:

    pecl install binpack

  • brew for Mac

    Binpack has been added to homebrew-php, so you can:

    brew search binpack
    

    Choose a version to install:

    brew install homebrew/php/php54-binpack
    

usage

<?php
$data = array('name' => 'srain');
$str = bin_encode($data);
$data = bin_decode($str);