bcpowmod_negative_exponent.phpt 336 B

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