{"id":18464801,"url":"https://github.com/krissss/bcmath","last_synced_at":"2025-07-16T07:34:50.847Z","repository":{"id":57009252,"uuid":"144704702","full_name":"krissss/bcmath","owner":"krissss","description":"PHP bcmath quick write.","archived":false,"fork":false,"pushed_at":"2025-03-27T09:39:03.000Z","size":48,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-27T20:08:21.460Z","etag":null,"topics":["bcmath","php-bcmath","php-math"],"latest_commit_sha":null,"homepage":null,"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/krissss.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,"zenodo":null}},"created_at":"2018-08-14T10:23:09.000Z","updated_at":"2025-03-27T09:38:37.000Z","dependencies_parsed_at":"2024-11-06T09:11:20.593Z","dependency_job_id":"fc4f989e-44f2-411d-a033-f45067e859f8","html_url":"https://github.com/krissss/bcmath","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"dbe843ce484df3f653c26b345606a40362b8f9b6"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/krissss/bcmath","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krissss%2Fbcmath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krissss%2Fbcmath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krissss%2Fbcmath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krissss%2Fbcmath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krissss","download_url":"https://codeload.github.com/krissss/bcmath/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krissss%2Fbcmath/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265492421,"owners_count":23776056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bcmath","php-bcmath","php-math"],"created_at":"2024-11-06T09:11:07.623Z","updated_at":"2025-07-16T07:34:50.796Z","avatar_url":"https://github.com/krissss.png","language":"PHP","readme":"# Kriss BCMath\n\nPHP bcmath quick write.\n\n# Install\n\n```\ncomposer require kriss/bcmath -vvv\n```\n\n## Usage\n\n```php\n\u003c?php\nuse kriss\\bcmath\\BCS;\nuse kriss\\bcmath\\BC;\nuse kriss\\bcmath\\BCParser;\nuse kriss\\bcmath\\BCSummary;\n\n$result = BCS::create(1.5, ['scale' =\u003e 2])-\u003eadd(1.2)-\u003emul(2)-\u003esub(1.5)-\u003egetResult();\necho $result; // 3.9\n\n$result = BC::create(['scale' =\u003e 2])-\u003eadd(1.2, 1.3, 1.5, 1.8);\necho $result; // 5.8\n\n$result = BCParser::create(['scale' =\u003e 4])-\u003eparse('5*3+3.5-1.8/7');\necho $result; // 18.2429\n\n$result = BCSummary::create(['scale' =\u003e 4])-\u003eaverage(18, ['A' =\u003e 1, 'B' =\u003e 2, 'C' =\u003e 3]);\necho $result; // ['A' =\u003e 3, 'B' =\u003e 6, 'C' =\u003e 9]\n\n$result = BCSummary::create(['scale' =\u003e 2])-\u003eupgrade(18, 36, 100) . '%';\necho $result; // 100%\n```\n\nmore example see `tests/phpunit`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrissss%2Fbcmath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrissss%2Fbcmath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrissss%2Fbcmath/lists"}