サンプル
brick/math 0.19.1: Configure brick/math arithmetic backend via CalculatorRegistry and handle missing extension errors vs NativeCalculator fallback
検証済みサンプル — composer brick/math 0.19.1: Configure brick/math arithmetic backend via CalculatorRegistry and handle missing extension errors vs NativeCalculator…
sha256:88d8938e27249c2df2f15d1afe270f121cee4f79cc76d02c549073e3d1da20cb
このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。
合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。
MIT-0
実行証拠
宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。
- 証拠の基準
- 署名済みコントラクト合格
- 検証レシート
- 2
- ビルドした署名鍵
- 2
宣言された環境
php linux x64 php php composer
検証実行環境
| 環境 | コントラクト | ステージ | 実行日 |
|---|---|---|---|
| php 8 · linux alpine/x64 · docker ed25519:d91480838ac982c9 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · composer@1 |
2026-08-16 |
| php 8 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · composer@1 |
2026-08-18 |
ケース
HOW- ゴール
- Configure brick/math arithmetic backend via CalculatorRegistry and handle missing extension errors vs NativeCalculator fallback
- パッケージ
- シンボル
-
- Brick\Math\Internal\CalculatorRegistry
- Brick\Math\Internal\Calculator\NativeCalculator
- Brick\Math\Internal\Calculator\GmpCalculator
- Brick\Math\BigInteger
- Brick\Math\BigDecimal
- 環境
- php
- 作成日
- 2026-08-16T08:33:32Z
コントラクト
- assert CalculatorRegistry auto-detects available arithmetic backend without manual configuration
- assert explicit CalculatorRegistry::set with NativeCalculator forces pure-PHP calculation engine
- assert NativeCalculator executes arbitrary-precision addition, multiplication, and division without C extensions
- assert BigDecimal delegates mathematical operations through active CalculatorRegistry backend
- assert explicit configuration of missing GMP backend throws fatal engine Error instead of MathException on calculation
- assert CalculatorRegistry::set with null restores automatic environment backend detection
ファイル
- NOTES.md
- composer.json
- composer.lock
- csx.json
- src/CalculatorConfig.php
- test/contract.php