PHPackages                             pointybeard/helpers-functions-flags - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. pointybeard/helpers-functions-flags

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

pointybeard/helpers-functions-flags
===================================

A collection of functions for handling bitwise flags

1.0.0(7y ago)14.2k—8.3%9MITPHPPHP &gt;=5.6.6

Since May 7Pushed 7y ago1 watchersCompare

[ Source](https://github.com/pointybeard/helpers-functions-flags)[ Packagist](https://packagist.org/packages/pointybeard/helpers-functions-flags)[ Docs](https://github.com/pointybeard/helpers-functions-flags)[ RSS](/packages/pointybeard-helpers-functions-flags/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (2)Versions (2)Used By (9)

PHP Helpers: Flag Functions
===========================

[](#php-helpers-flag-functions)

- Version: v1.0.0
- Date: May 08 2019
- [Release notes](https://github.com/pointybeard/helpers-functions-flags/blob/master/CHANGELOG.md)
- [GitHub repository](https://github.com/pointybeard/helpers-functions-flags)

A collection of functions for handling bitwise flags

Installation
------------

[](#installation)

This library is installed via [Composer](http://getcomposer.org/). To install, use `composer require pointybeard/helpers-functions-flags` or add `"pointybeard/helpers-functions-flags": "~1.0"` to your `composer.json` file.

And run composer to update your dependencies:

```
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update

```

### Requirements

[](#requirements)

There are no particuar requirements for this library other than PHP 5.6 or greater.

To include all the [PHP Helpers](https://github.com/pointybeard/helpers) packages on your project, use `composer require pointybeard/helpers` or add `"pointybeard/helpers": "~1.0"` to your composer file.

Usage
-----

[](#usage)

This library is a collection convenience function for common tasks relating to bitwise flags. They are included by the vendor autoloader automatically. The functions have a namespace of `pointybeard\Helpers\Functions\Flags`

The following functions are provided:

- `is_flag_set(int $flags, int $flag)`

Example usage:

```
