mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
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
22 lines
448 B
PHP
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
|