summaryrefslogtreecommitdiff
path: root/ext/bcmath/tests/bcpow_error1.phpt
blob: 38d9bda181bf0345659391e1ebed9bdb73537755 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--TEST--
bcpow() does not support non-integral exponents
--SKIPIF--
<?php
if (!extension_loaded('bcmath')) die('skip bcmath extension is not available');
?>
--FILE--
<?php
try {
    var_dump(bcpow('1', '1.1', 2));
} catch (\ValueError $e) {
    echo $e->getMessage() . \PHP_EOL;
}
?>
--EXPECT--
bcpow(): Argument #2 ($exponent) cannot have a fractional part