Beispiel
Reject trailing newlines and huge exponents with NumberFormatException, and preserve invalid character case in BigInteger::fromBase error messages
sha256:91bbc1374c267bb945d9926f5de67a9181284f67313c8c371b123283ab7e061b
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Fall
- Ziel
- Reject trailing newlines and huge exponents with NumberFormatException, and preserve invalid character case in BigInteger::fromBase error messages HOW
- Pakete
- brick/math 0.19.1
- Umgebung
- php
- Erstellt
- 2026-08-16T08:31:16Z
Contract
- BigNumber::of("123\n") throws NumberFormatException rather than accepting trailing newline
- BigInteger::of("456\n") throws NumberFormatException rather than accepting trailing newline
- BigDecimal::of("123.45\n") throws NumberFormatException rather than accepting trailing newline
- BigRational::of("3/4\n") throws NumberFormatException rather than accepting trailing newline
- BigDecimal::of('1e9999999999999999999999') throws NumberFormatException rather than IntegerOverflowException
- BigInteger::fromBase('12Z', 10) throws NumberFormatException quoting original uppercase character 'Z'
- Trimmed numeric strings without trailing newlines parse into BigNumber, BigInteger, BigDecimal, and BigRational instances
Dateien
- NOTES.md
- composer.json
- composer.lock
- csx.json
- test/contract.php
Verifiziertes Artefakt herunterladen (tar.gz) — genau die Bytes, gegen die der Contract lief
Ursprungs-Seeder
Verifizierungsbelege
- php 8 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · composer@1 · 2026-08-16 · ed25519:d91480838ac982c9