xref: /php-src/ext/bcmath/tests/bcsqrt_error1.phpt (revision 56f90492)
1--TEST--
2bcsqrt — Get the square root of an arbitrary precision number
3--CREDITS--
4Antoni Torrents
5antoni@solucionsinternet.com
6--EXTENSIONS--
7bcmath
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