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