phpinnacle / buffer
PHPinnacle binary buffer implementation
Installs: 67 513
Dependents: 9
Suggesters: 0
Security: 0
Stars: 24
Watchers: 2
Forks: 2
Open Issues: 1
Requires
- php: >=7.3
Requires (Dev)
- phpunit/phpunit: ^9.0
Suggests
- ext-buffer: C extension to speed up pack/unpack binary data
README
PHPinnacle Buffer is a simple tool for operating binary data in PHP. Mostly it simply wraps PHP pack/unpack functions.
Install
Via Composer
$ composer require phpinnacle/buffer
Basic Usage
<?php use PHPinnacle\Buffer\ByteBuffer; // AMQP protocol header $buffer = new ByteBuffer; $buffer ->append('AMQP') ->appendUint8(0) ->appendUint8(0) ->appendUint8(9) ->appendUint8(1) ;
Testing
$ composer test
Benchmarks
$ composer bench
Some results with pure PHP realisation:
And results with enabled extension:
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Security
If you discover any security related issues, please email dev@phpinnacle.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.