{"id":21713793,"url":"https://github.com/semisedlak/bitmasking","last_synced_at":"2026-05-18T04:39:35.431Z","repository":{"id":149992216,"uuid":"622656757","full_name":"semisedlak/bitmasking","owner":"semisedlak","description":"This simple library provides a set of functions for easier life when dealing with bitmasks.","archived":false,"fork":false,"pushed_at":"2023-04-02T20:00:08.000Z","size":4,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-13T00:47:03.137Z","etag":null,"topics":["bitmask","bitmasking","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/semisedlak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-02T18:43:05.000Z","updated_at":"2024-07-20T22:59:45.000Z","dependencies_parsed_at":"2023-08-23T09:03:08.624Z","dependency_job_id":null,"html_url":"https://github.com/semisedlak/bitmasking","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/semisedlak/bitmasking","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semisedlak%2Fbitmasking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semisedlak%2Fbitmasking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semisedlak%2Fbitmasking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semisedlak%2Fbitmasking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/semisedlak","download_url":"https://codeload.github.com/semisedlak/bitmasking/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semisedlak%2Fbitmasking/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33165103,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T22:39:12.733Z","status":"online","status_checked_at":"2026-05-18T02:00:06.436Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitmask","bitmasking","php"],"created_at":"2024-11-26T00:20:53.281Z","updated_at":"2026-05-18T04:39:35.397Z","avatar_url":"https://github.com/semisedlak.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Bitmasking\n==========\n\nThis simple library provides a set of functions for easier life when dealing with bitmasks.\n\nYou can install it using composer:\n\n```shell\n$ composer require semisedlak/bitmasking\n```\n\n## How it works\n\nCreate your own bitmask class which extends from `Semisedlak\\Bitmasking\\Bitmask` class. Define your bitmask constants in this class. Set the `$bitmask` property and your `$maxBits` property (in fact it means how many \"settings\" will you have).\n\n## Good to know\n\nWhen defining a bitmask constants use powers of two, e.g.:\n\n```php\nconst BIT_1 = 1; // 1 \u003c\u003c 0\nconst BIT_2 = 2; // 1 \u003c\u003c 1\nconst BIT_3 = 4; // 1 \u003c\u003c 2\nconst BIT_4 = 8; // 1 \u003c\u003c 3\nconst BIT_5 = 16; // 1 \u003c\u003c 4\n\nconst BIT_ALL = BIT_1 | BIT_2 | BIT_3 | BIT_4 | BIT_5;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemisedlak%2Fbitmasking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsemisedlak%2Fbitmasking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemisedlak%2Fbitmasking/lists"}