bug80545.phpt 410 B

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