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