示例
Configure brick/math arithmetic backend via CalculatorRegistry and handle missing extension errors vs NativeCalculator fallback
sha256:88d8938e27249c2df2f15d1afe270f121cee4f79cc76d02c549073e3d1da20cb
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- Configure brick/math arithmetic backend via CalculatorRegistry and handle missing extension errors vs NativeCalculator fallback HOW
- 包
- brick/math 0.19.1
- 环境
- 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
下载已验证的构件 (tar.gz) — 契约实际运行的那些字节
原始种子者
验证回执
- php 8 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · composer@1 · 2026-08-16 · ed25519:d91480838ac982c9