axy / binary
Working with binary strings
Installs: 21 145
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: >=8.1
Requires (Dev)
- phpunit/phpunit: ~10.0.15
- squizlabs/php_codesniffer: =3.7.1
This package is auto-updated.
Last update: 2024-11-19 13:55:20 UTC
README
Working with binary strings in PHP. At the moment this package doesn't make much sense. Used by some other packages.
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): int
getSlice(string $string, int $offset [, int $length]): string
getByteFromChar(string $char [, bool $signed = FALSE]): int
getByteFromString(string $string, int $index [, bool $signed = FALSE]): int
unpackBytes(string $string [, bool $signed = false]): int[]