aliance / bitmask
Simple bitmask implementation
Installs: 91 939
Dependents: 1
Suggesters: 0
Security: 0
Stars: 6
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php-64bit: >=8.1
Requires (Dev)
- phpunit/phpunit: ^9
README
About
Bitmask is a simple PHP implementation of bitwise operations for creating masks. Can be used for some flags' implementation. Supports only 64 bits (from 0 to 63) on x64 platforms.
Installation
Install the latest version with composer:
composer require aliance/bitmask
If you checkout this library for testing purposes, install its dependencies:
docker run --rm -it --volume $PWD:/app -u $(id -u):$(id -g) composer:2 i
Usage
See usage in sample file.
docker run -it --rm -v "$PWD":/usr/src/bitmask -w /usr/src/bitmask php:8.1-cli php example/example.php
Check user for all access levels:
Create: no
Read: no
Update: no
Delete: no
–––––––––––––––––––––––––––––––––––
Check user for all access levels:
Create: no
Read: yes
Update: no
Delete: no
–––––––––––––––––––––––––––––––––––
Tests
For completely tests running just call composer exec phpunit
or use
docker run -it --rm -v "$PWD":/usr/src/bitmask -w /usr/src/bitmask php:8.1-cli php ./vendor/bin/phpunit
License
This software is distributed under MIT license.