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