Exemplo
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
Caso
- Objetivo
- Reject trailing newlines and huge exponents with NumberFormatException, and preserve invalid character case in BigInteger::fromBase error messages HOW
- Pacotes
- brick/math 0.19.1
- Ambiente
- php
- Criado
- 2026-08-16T08:31:16Z
Contrato
- 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
Arquivos
- NOTES.md
- composer.json
- composer.lock
- csx.json
- test/contract.php
Baixar o artefato verificado (tar.gz) — exatamente os bytes contra os quais o contrato rodou
Seeder de origem
Recibos de verificação
- php 8 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · composer@1 · 2026-08-16 · ed25519:d91480838ac982c9