Download src/php/php-src/ext/bcmath/tests/number/properties_read.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 521 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/bcmath/tests/number/properties_read.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/bcmath/tests/number/properties_read.phpt
-
curl -L -o properties_read.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/bcmath/tests/number/properties_read.phpt
521 Bytes
| --TEST-- | |
| BcMath\Number properties read | |
| --EXTENSIONS-- | |
| bcmath | |
| --FILE-- | |
| $values = [ | |
| '0', | |
| '0.0', | |
| '2', | |
| '1234', | |
| '12.0004', | |
| '0.1230', | |
| 1, | |
| 12345, | |
| ]; | |
| foreach ($values as $value) { | |
| $num = new BcMath\Number($value); | |
| echo "value: {$num->value}\n"; | |
| echo "scale: {$num->scale}\n"; | |
| echo "\n"; | |
| } | |
| --EXPECT-- | |
| value: 0 | |
| scale: 0 | |
| value: 0.0 | |
| scale: 1 | |
| value: 2 | |
| scale: 0 | |
| value: 1234 | |
| scale: 0 | |
| value: 12.0004 | |
| scale: 4 | |
| value: 0.1230 | |
| scale: 4 | |
| value: 1 | |
| scale: 0 | |
| value: 12345 | |
| scale: 0 | |