File size: 452 Bytes
1e94262
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--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