xref: /PHP-8.2/ext/bcmath/tests/bcsqrt_error2.phpt (revision 56f90492)
1--TEST--
2bcsqrt() requires a well-formed value
3--EXTENSIONS--
4bcmath
5--FILE--
6<?php
7
8try {
9    bcsqrt('a');
10} catch (\ValueError $e) {
11    echo $e->getMessage() . PHP_EOL;
12}
13
14?>
15--EXPECT--
16bcsqrt(): Argument #1 ($num) is not well-formed
17