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