Download src/php/php-src/ext/bcmath/tests/bcdiv_error1.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 557 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/bcmath/tests/bcdiv_error1.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/bcmath/tests/bcdiv_error1.phpt
-
curl -L -o bcdiv_error1.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/bcmath/tests/bcdiv_error1.phpt
557 Bytes
| --TEST-- | |
| bcdiv — Divide two arbitrary precision numbers | |
| --CREDITS-- | |
| TestFest2009 | |
| Antoni Torrents | |
| antoni@solucionsinternet.com | |
| --EXTENSIONS-- | |
| bcmath | |
| --FILE-- | |
| try { | |
| bcdiv('10.99', '0'); | |
| } catch (DivisionByZeroError $ex) { | |
| echo $ex->getMessage(), PHP_EOL; | |
| } | |
| try { | |
| bcdiv('10.99', '0.00'); | |
| } catch (DivisionByZeroError $ex) { | |
| echo $ex->getMessage(), PHP_EOL; | |
| } | |
| try { | |
| bcdiv('10.99', '-0.00'); | |
| } catch (DivisionByZeroError $ex) { | |
| echo $ex->getMessage(), PHP_EOL; | |
| } | |
| --EXPECT-- | |
| Division by zero | |
| Division by zero | |
| Division by zero | |