1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 13:01:02 +02:00
Files
archived-php-src/ext/bcmath/tests/bcpow_error1.phpt
George Peter Banyard cd05b56a6f Promote some warnings in BCMath to Errors
Also do a bit of refactoring at the same time.

Closes GH-6105
2020-09-11 17:40:06 +02:00

17 lines
358 B
PHP

--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