Download src/php/php-src/ext/gmp/tests/bug81119.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 718 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/gmp/tests/bug81119.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/gmp/tests/bug81119.phpt
-
curl -L -o bug81119.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/gmp/tests/bug81119.phpt
718 Bytes
| --TEST-- | |
| GMP operators throw errors with wrong parameter names | |
| --EXTENSIONS-- | |
| gmp | |
| --FILE-- | |
| function test($f) { | |
| try { | |
| $f(); | |
| echo "No error?\n"; | |
| } catch (TypeError|ValueError $e) { | |
| echo $e->getMessage(), "\n"; | |
| } | |
| } | |
| test(fn($WRONG_SCOPE_1 = 0, $WRONG_SCOPE_2 = 0) => gmp_init(1) < "x"); | |
| test(fn($WRONG_SCOPE_1 = 0, $WRONG_SCOPE_2 = 0) => gmp_init(1) < []); | |
| test(fn($WRONG_SCOPE_1 = 0, $WRONG_SCOPE_2 = 0) => gmp_init(1) + "x"); | |
| test(fn($WRONG_SCOPE_1 = 0, $WRONG_SCOPE_2 = 0) => gmp_init(1) + []); | |
| --EXPECT-- | |
| Number is not an integer string | |
| Number must be of type GMP|string|int, array given | |
| Number is not an integer string | |
| Number must be of type GMP|string|int, array given | |