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