mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
ee22612856
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
21 lines
452 B
PHP
21 lines
452 B
PHP
--TEST--
|
|
bcpow() does not support non-integral exponents
|
|
--EXTENSIONS--
|
|
bcmath
|
|
--FILE--
|
|
<?php
|
|
try {
|
|
var_dump(bcpow('1', '1.1', 2));
|
|
} catch (\ValueError $e) {
|
|
echo $e->getMessage() . \PHP_EOL;
|
|
}
|
|
try {
|
|
var_dump(bcpow('1', '0.1', 2));
|
|
} catch (\ValueError $e) {
|
|
echo $e->getMessage() . \PHP_EOL;
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
bcpow(): Argument #2 ($exponent) cannot have a fractional part
|
|
bcpow(): Argument #2 ($exponent) cannot have a fractional part
|