Download src/php/php-src/ext/com_dotnet/tests/variant_variation.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 446 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/com_dotnet/tests/variant_variation.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/com_dotnet/tests/variant_variation.phpt
-
curl -L -o variant_variation.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/com_dotnet/tests/variant_variation.phpt
446 Bytes
| --TEST-- | |
| Testing variant arrays | |
| --EXTENSIONS-- | |
| com_dotnet | |
| --FILE-- | |
| $arrays = [ | |
| "order" => [2 => 1, 1 => 2, 0 => 3], | |
| "off" => [2 => 1, 1 => 2, 3], | |
| "negative" => [-1 => 42], | |
| ]; | |
| foreach ($arrays as $desc => $array) { | |
| echo "-- $desc --\n"; | |
| $v = new variant($array); | |
| foreach ($v as $val) { | |
| var_dump($val); | |
| } | |
| } | |
| --EXPECTF-- | |
| -- order -- | |
| int(3) | |
| int(2) | |
| int(1) | |
| -- off -- | |
| NULL | |
| int(2) | |
| int(1) | |
| -- negative -- | |
| %ANULL | |