bcpow_error3.phpt 384 B

1234567891011121314151617181920212223
  1. --TEST--
  2. bcpow() requires well-formed values
  3. --EXTENSIONS--
  4. bcmath
  5. --FILE--
  6. <?php
  7. try {
  8. bcpow('a', '1');
  9. } catch (\ValueError $e) {
  10. echo $e->getMessage() . PHP_EOL;
  11. }
  12. try {
  13. bcpow('1', 'a');
  14. } catch (\ValueError $e) {
  15. echo $e->getMessage() . PHP_EOL;
  16. }
  17. ?>
  18. --EXPECT--
  19. bcpow(): Argument #1 ($num) is not well-formed
  20. bcpow(): Argument #2 ($exponent) is not well-formed