axy/binary
Working with binary strings
Maintainers
0.2.0
2023-03-16 13:56 UTC
Requires
- php: >=8.1
Requires (Dev)
- phpunit/phpunit: ~10.0.15
- squizlabs/php_codesniffer: =3.7.1
Suggests
None
Provides
None
Conflicts
None
Replaces
None
MIT 80442a993f8b07ac1a94e8c5376184fbf2c00ddd
- Oleg Grigoriev <go.vasac.woop@gmail.com>
This package is auto-updated.
Last update: 2026-06-19 17:15:47 UTC
README
Working with binary strings in PHP. At the moment this package doesn't make much sense. Used by some other packages.
👁 Latest Stable Version
👁 Minimum PHP Version
👁 Tests
👁 Coverage Status
👁 License
Documentation
Native string functions allow to work with text strings as with binary (a char is a byte). The problem is that these functions can be overridden from mbstring.
The library uses mbstring functions with the charset 8bit.
And native functions if mbstring is not enabled.
Binary
Class axy\binary\Binary with static methods.
getLength(string $string): intgetSlice(string $string, int $offset [, int $length]): stringgetByteFromChar(string $char [, bool $signed = FALSE]): intgetByteFromString(string $string, int $index [, bool $signed = FALSE]): intunpackBytes(string $string [, bool $signed = false]): int[]
