summaryrefslogtreecommitdiff
path: root/ext/bcmath/tests/bcpowmod_negative_exponent.phpt
blob: 7814e2bd41d82038cdb3361438d9dd97dc99b09e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--TEST--
bc_raisemod's expo can't be negative
--CREDITS--
Gabriel Caruso (carusogabriel34@gmail.com)
--EXTENSIONS--
bcmath
--FILE--
<?php
try {
    var_dump(bcpowmod('1', '-1', '2'));
} catch (\ValueError $e) {
    echo $e->getMessage() . \PHP_EOL;
}
?>
--EXPECT--
bcpowmod(): Argument #2 ($exponent) must be greater than or equal to 0