mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
56f90492d6
For rationale, see https://github.com/php/php-src/pull/6787 Extensions migrated in this part: * bcmath * bz2 * calendar * com_dotnet * ctype Closes GH-6797.
21 lines
491 B
PHP
21 lines
491 B
PHP
--TEST--
|
|
Bug 72093: bcpowmod fails on negative scale and corrupts _one_ definition
|
|
--EXTENSIONS--
|
|
bcmath
|
|
--FILE--
|
|
<?php
|
|
try {
|
|
var_dump(bcpowmod(1, 0, 128, -200));
|
|
} catch (\ValueError $e) {
|
|
echo $e->getMessage() . \PHP_EOL;
|
|
}
|
|
try {
|
|
var_dump(bcpowmod(1, 1.2, 1, 1));
|
|
} catch (\ValueError $e) {
|
|
echo $e->getMessage() . \PHP_EOL;
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
bcpowmod(): Argument #4 ($scale) must be between 0 and 2147483647
|
|
bcpowmod(): Argument #2 ($exponent) cannot have a fractional part
|