xref: /PHP-8.0/ext/bcmath/tests/bcsqrt_error1.phpt (revision 25198277)
1--TEST--
2bcsqrt — Get the square root of an arbitrary precision number
3--CREDITS--
4Antoni Torrents
5antoni@solucionsinternet.com
6--SKIPIF--
7<?php if(!extension_loaded("bcmath")) print "skip"; ?>
8--FILE--
9<?php
10try {
11    bcsqrt('-9');
12} catch (ValueError $ex) {
13    echo $ex->getMessage(), PHP_EOL;
14}
15?>
16--EXPECT--
17bcsqrt(): Argument #1 ($num) must be greater than or equal to 0
18