bcsqrt_error1.phpt 335 B

1234567891011121314151617
  1. --TEST--
  2. bcsqrt — Get the square root of an arbitrary precision number
  3. --CREDITS--
  4. Antoni Torrents
  5. antoni@solucionsinternet.com
  6. --EXTENSIONS--
  7. bcmath
  8. --FILE--
  9. <?php
  10. try {
  11. bcsqrt('-9');
  12. } catch (ValueError $ex) {
  13. echo $ex->getMessage(), PHP_EOL;
  14. }
  15. ?>
  16. --EXPECT--
  17. bcsqrt(): Argument #1 ($num) must be greater than or equal to 0