{"id":13408932,"url":"https://github.com/phpseclib/bcmath_compat","last_synced_at":"2025-03-14T13:32:12.588Z","repository":{"id":53322788,"uuid":"188619173","full_name":"phpseclib/bcmath_compat","owner":"phpseclib","description":"PHP 5.x-8.x polyfill for bcmath extension.","archived":false,"fork":false,"pushed_at":"2024-09-02T20:14:33.000Z","size":41,"stargazers_count":165,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-08T18:24:55.279Z","etag":null,"topics":["bcmath","bcmath-polyfill","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phpseclib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2019-05-25T22:49:12.000Z","updated_at":"2025-02-06T13:42:04.000Z","dependencies_parsed_at":"2024-04-12T12:38:44.112Z","dependency_job_id":"21e95d01-ba39-4709-b6ff-9b4629e27b16","html_url":"https://github.com/phpseclib/bcmath_compat","commit_stats":{"total_commits":50,"total_committers":3,"mean_commits":"16.666666666666668","dds":0.5,"last_synced_commit":"df7182cc98b90d85e8b008764fc9e58991d48d96"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpseclib%2Fbcmath_compat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpseclib%2Fbcmath_compat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpseclib%2Fbcmath_compat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phpseclib%2Fbcmath_compat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phpseclib","download_url":"https://codeload.github.com/phpseclib/bcmath_compat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243314589,"owners_count":20271381,"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","bcmath-polyfill","php"],"created_at":"2024-07-30T20:00:56.684Z","updated_at":"2025-03-14T13:32:12.560Z","avatar_url":"https://github.com/phpseclib.png","language":"PHP","readme":"# bcmath_compat\n\n[![Software License][ico-license]](LICENSE.md)\n[![CI Status](https://github.com/phpseclib/bcmath_compat/actions/workflows/ci.yml/badge.svg?branch=master\u0026event=push \"CI Status\")](https://github.com/phpseclib/bcmath_compat/actions/workflows/ci.yml?query=branch%3Amaster)\n\nPHP 5.x-8.x polyfill for bcmath extension\n\n## Installation\n\nWith [Composer](https://getcomposer.org/):\n\n```bash\n$ composer require phpseclib/bcmath_compat\n```\n\n## Limitations\n\n- `extension_loaded('bcmath')`\n\n  bcmath_compat cannot make this return true. The recommended remediation is to not do this.\n\n- `ini_set('bcmath.scale', ...)`\n\n  You cannot set configuration options for extensions that are not installed. If you do `ini_set('bcmath.scale', 5)` on a system without bcmath installed then `ini_get('bcmath.scale')` will return `false`. It's similar to what happens when you do `ini_set('zzz', 5)` and then `ini_get('zzz')`. You'll get `false` back.\n\n  The recommended remediation to doing `ini_set('bcmath.scale', ...)` is to do `bcscale(...)`. The recommended remediation for doing `ini_get` is (if you're using PHP \u003e= 7.3.0) to do `bcscale()` or (if you're using PHP \u003c 7.3.0) to do `max(0, strlen(bcadd('0', '0')) - 2)`.\n\n  Note that `ini_get` always returns a string whereas the recommended remediations return integers.\n\n[ico-version]: https://img.shields.io/packagist/v/phpseclib/bcmath_compat.svg?style=flat-square\n[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\n[ico-travis]: https://img.shields.io/travis/phpseclib/bcmath_compat/master.svg?style=flat-square\n[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/phpseclib/bcmath_compat.svg?style=flat-square\n[ico-code-quality]: https://img.shields.io/scrutinizer/g/phpseclib/bcmath_compat.svg?style=flat-square\n[ico-downloads]: https://img.shields.io/packagist/dt/phpseclib/bcmath_compat.svg?style=flat-square\n\n[link-packagist]: https://packagist.org/packages/phpseclib/bcmath_compat\n[link-travis]: https://travis-ci.org/phpseclib/bcmath_compat\n[link-scrutinizer]: https://scrutinizer-ci.com/g/phpseclib/bcmath_compat/code-structure\n[link-code-quality]: https://scrutinizer-ci.com/g/phpseclib/bcmath_compat\n[link-downloads]: https://packagist.org/packages/phpseclib/bcmath_compat\n","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpseclib%2Fbcmath_compat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphpseclib%2Fbcmath_compat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpseclib%2Fbcmath_compat/lists"}