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