bcmul_error.phpt 381 B

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