1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext/bcmath/tests/bcpow_error2.phpt
Jorg Adam Sowa ee22612856 Extend tests of bcmath extension (#11563)
Add coverage for:

 * different formats of zero (0, 0.0)
 * small integers and decimals
 * large integers and large decimals with large fractional part
 * negative numbers for all of the above ones
2023-07-05 17:43:30 +01:00

22 lines
448 B
PHP

--TEST--
bcpow() does not support exponents >= 2**63
--EXTENSIONS--
bcmath
--FILE--
<?php
try {
var_dump(bcpow('0', '9223372036854775808', 2));
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
}
try {
var_dump(bcpow('0', '-9223372036854775808', 2));
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
}
?>
--EXPECT--
bcpow(): Argument #2 ($exponent) is too large
bcpow(): Argument #2 ($exponent) is too large