xref: /php-src/ext/bcmath/tests/bcadd_error.phpt (revision 56f90492)
1--TEST--
2bcadd() requires well-formed values
3--EXTENSIONS--
4bcmath
5--FILE--
6<?php
7
8try {
9    bcadd('a', '1');
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() . PHP_EOL;
18}
19
20?>
21--EXPECT--
22bcadd(): Argument #1 ($num1) is not well-formed
23bcadd(): Argument #2 ($num2) is not well-formed
24