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.
Install the latest version with composer:
composer require aliance/bitmaskIf you checkout this library for testing purposes, install its dependencies:
docker run --rm -it --volume $PWD:/app -u $(id -u):$(id -g) composer:2 iSee 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 ––––––––––––––––––––––––––––––––––– 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 This software is distributed under MIT license.
