{"id":25171241,"url":"https://github.com/basemax/yourcombinationsphp","last_synced_at":"2026-04-21T03:31:14.035Z","repository":{"id":151535650,"uuid":"546287913","full_name":"BaseMax/YourCombinationsPHP","owner":"BaseMax","description":"An efficient combinatorics library for PHP 8 to generate and get the list of all Permutations and Combinations with the ability to enable or disable repetition. (utilizing generators)","archived":false,"fork":false,"pushed_at":"2022-10-26T05:21:46.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-25T11:57:36.242Z","etag":null,"topics":["algorithm","algorithms","combinatoric","combinatoric-functions","combinatorics","combinatorics-library","generator","generator-function","generator-php","generators","generators-php","permutation","permutation-algorithms","permutations","php","php-generator","php-generators"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BaseMax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-10-05T21:07:02.000Z","updated_at":"2022-10-26T06:06:22.000Z","dependencies_parsed_at":"2023-07-10T15:01:38.691Z","dependency_job_id":null,"html_url":"https://github.com/BaseMax/YourCombinationsPHP","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BaseMax/YourCombinationsPHP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FYourCombinationsPHP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FYourCombinationsPHP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FYourCombinationsPHP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FYourCombinationsPHP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaseMax","download_url":"https://codeload.github.com/BaseMax/YourCombinationsPHP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FYourCombinationsPHP/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32075214,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T02:38:07.213Z","status":"ssl_error","status_checked_at":"2026-04-21T02:38:06.559Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["algorithm","algorithms","combinatoric","combinatoric-functions","combinatorics","combinatorics-library","generator","generator-function","generator-php","generators","generators-php","permutation","permutation-algorithms","permutations","php","php-generator","php-generators"],"created_at":"2025-02-09T09:19:40.197Z","updated_at":"2026-04-21T03:31:14.027Z","avatar_url":"https://github.com/BaseMax.png","language":"PHP","readme":"# Your Combinations PHP\n\nAn efficient combinatorics library for PHP 8 to generate and get the list of all **Permutations** and **Combinations** with the ability to enable or disable repetition. (utilizing generators)\n\n## Functions\n\n- [PowerSet](#powerset)\n- [Permutation with repetition](#permutation-with-repetition)\n- [Permutation without repetition](#permutation-without-repetition)\n- [Combinations with repetition](#combinations-with-repetition)\n- [Combinations without repetition](#combinations-without-repetition)\n\n## Usage\n\n### PowerSet\n\n```php\n$your_combinations = new YourCombinations([1, 2, 3]);\nprint_r([...$your_combinations-\u003epowerSet()]);\n\n// [\n//   [],       [ 1 ],\n//   [ 2 ],    [ 1, 2 ],\n//   [ 3 ],    [ 1, 3 ],\n//   [ 2, 3 ], [ 1, 2, 3 ]\n// ]\n```\n\n### Permutation with repetition\n\n```php\n$your_combinations = new YourCombinations([1, 2, 3]);\n$your_combinations-\u003ePermutations(4, true);\n\n// [ 1, 1, 1, 1 ]\n// [ 1, 1, 1, 2 ]\n// [ 1, 1, 1, 3 ]\n// [ 1, 1, 2, 1 ]\n// [ 1, 1, 2, 2 ]\n// [ 1, 1, 2, 3 ]\n// [ 1, 1, 3, 1 ]\n// [ 1, 1, 3, 2 ]\n// [ 1, 1, 3, 3 ]\n// [ 1, 2, 1, 1 ]\n// [ 1, 2, 1, 2 ]\n// [ 1, 2, 1, 3 ]\n// [ 1, 2, 2, 1 ]\n// [ 1, 2, 2, 2 ]\n// [ 1, 2, 2, 3 ]\n// [ 1, 2, 3, 1 ]\n// [ 1, 2, 3, 2 ]\n// [ 1, 2, 3, 3 ]\n// [ 1, 3, 1, 1 ]\n// [ 1, 3, 1, 2 ]\n// [ 1, 3, 1, 3 ]\n// [ 1, 3, 2, 1 ]\n// [ 1, 3, 2, 2 ]\n// [ 1, 3, 2, 3 ]\n// [ 1, 3, 3, 1 ]\n// [ 1, 3, 3, 2 ]\n// [ 1, 3, 3, 3 ]\n// [ 2, 1, 1, 1 ]\n// [ 2, 1, 1, 2 ]\n// [ 2, 1, 1, 3 ]\n// [ 2, 1, 2, 1 ]\n// [ 2, 1, 2, 2 ]\n// [ 2, 1, 2, 3 ]\n// [ 2, 1, 3, 1 ]\n// [ 2, 1, 3, 2 ]\n// [ 2, 1, 3, 3 ]\n// [ 2, 2, 1, 1 ]\n// [ 2, 2, 1, 2 ]\n// [ 2, 2, 1, 3 ]\n// [ 2, 2, 2, 1 ]\n// [ 2, 2, 2, 2 ]\n// [ 2, 2, 2, 3 ]\n// [ 2, 2, 3, 1 ]\n// [ 2, 2, 3, 2 ]\n// [ 2, 2, 3, 3 ]\n// [ 2, 3, 1, 1 ]\n// [ 2, 3, 1, 2 ]\n// [ 2, 3, 1, 3 ]\n// [ 2, 3, 2, 1 ]\n// [ 2, 3, 2, 2 ]\n// [ 2, 3, 2, 3 ]\n// [ 2, 3, 3, 1 ]\n// [ 2, 3, 3, 2 ]\n// [ 2, 3, 3, 3 ]\n// [ 3, 1, 1, 1 ]\n// [ 3, 1, 1, 2 ]\n// [ 3, 1, 1, 3 ]\n// [ 3, 1, 2, 1 ]\n// [ 3, 1, 2, 2 ]\n// [ 3, 1, 2, 3 ]\n// [ 3, 1, 3, 1 ]\n// [ 3, 1, 3, 2 ]\n// [ 3, 1, 3, 3 ]\n// [ 3, 2, 1, 1 ]\n// [ 3, 2, 1, 2 ]\n// [ 3, 2, 1, 3 ]\n// [ 3, 2, 2, 1 ]\n// [ 3, 2, 2, 2 ]\n// [ 3, 2, 2, 3 ]\n// [ 3, 2, 3, 1 ]\n// [ 3, 2, 3, 2 ]\n// [ 3, 2, 3, 3 ]\n// [ 3, 3, 1, 1 ]\n// [ 3, 3, 1, 2 ]\n// [ 3, 3, 1, 3 ]\n// [ 3, 3, 2, 1 ]\n// [ 3, 3, 2, 2 ]\n// [ 3, 3, 2, 3 ]\n// [ 3, 3, 3, 1 ]\n// [ 3, 3, 3, 2 ]\n// [ 3, 3, 3, 3 ]\n```\n\n### Permutation without repetition\n\n```php\n$your_combinations = new YourCombinations([1, 2, 3]);\n$your_combinations-\u003ePermutations(2, false);\n\n// [ 1, 2 ]\n// [ 1, 3 ]\n// [ 2, 1 ]\n// [ 2, 3 ]\n// [ 3, 1 ]\n// [ 3, 2 ]\n```\n\n### Combinations with repetition\n\n```php\n$your_combinations = new YourCombinations([1, 2, 3]);\n$your_combinations-\u003eCombinations(4, true);\n\n// [ 1, 1, 1, 1 ]\n// [ 1, 1, 1, 2 ]\n// [ 1, 1, 1, 3 ]\n// [ 1, 1, 2, 2 ]\n// [ 1, 1, 2, 3 ]\n// [ 1, 1, 3, 3 ]\n// [ 1, 2, 2, 2 ]\n// [ 1, 2, 2, 3 ]\n// [ 1, 2, 3, 3 ]\n// [ 1, 3, 3, 3 ]\n// [ 2, 2, 2, 2 ]\n// [ 2, 2, 2, 3 ]\n// [ 2, 2, 3, 3 ]\n// [ 2, 3, 3, 3 ]\n// [ 3, 3, 3, 3 ]\n```\n\n### Combinations without repetition\n\n```php\n$your_combinations = new YourCombinations([1, 2, 3]);\n$your_combinations-\u003eCombinations(2, false);\n\n// [ 1, 2 ]\n// [ 1, 3 ]\n// [ 2, 3 ]\n```\n\n© Copyright, 2022 Max Base\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fyourcombinationsphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasemax%2Fyourcombinationsphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fyourcombinationsphp/lists"}