Download src/php/php-src/ext/bcmath/tests/bcmod_error2.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 463 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/bcmath/tests/bcmod_error2.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/bcmath/tests/bcmod_error2.phpt
-
curl -L -o bcmod_error2.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/bcmath/tests/bcmod_error2.phpt
463 Bytes
| --TEST-- | |
| bcmod() - mod by 0 | |
| --EXTENSIONS-- | |
| bcmath | |
| --INI-- | |
| bcmath.scale=0 | |
| --FILE-- | |
| try { | |
| bcmod("10", "0"); | |
| } catch (DivisionByZeroError $ex) { | |
| echo $ex->getMessage(), PHP_EOL; | |
| } | |
| try { | |
| bcmod("10", "0.000"); | |
| } catch (DivisionByZeroError $ex) { | |
| echo $ex->getMessage(), PHP_EOL; | |
| } | |
| try { | |
| bcmod("10", "-0.0"); | |
| } catch (DivisionByZeroError $ex) { | |
| echo $ex->getMessage(), PHP_EOL; | |
| } | |
| --EXPECT-- | |
| Modulo by zero | |
| Modulo by zero | |
| Modulo by zero | |