Download src/php/php-src/ext/random/tests/01_functions/bug46587.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 340 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/random/tests/01_functions/bug46587.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/random/tests/01_functions/bug46587.phpt
-
curl -L -o bug46587.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/random/tests/01_functions/bug46587.phpt
340 Bytes
| --TEST-- | |
| Bug #46587 (mt_rand() does not check that max is greater than min). | |
| --FILE-- | |
| var_dump(mt_rand(3,8)); | |
| try { | |
| var_dump(mt_rand(8,3)); | |
| } catch (ValueError $e) { | |
| echo $e->getMessage(), "\n"; | |
| } | |
| echo "Done.\n"; | |
| --EXPECTF-- | |
| int(%d) | |
| mt_rand(): Argument #2 ($max) must be greater than or equal to argument #1 ($min) | |
| Done. | |