Download src/php/php-src/Zend/tests/enum/backed-negative-int.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 277 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/enum/backed-negative-int.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/enum/backed-negative-int.phpt
-
curl -L -o backed-negative-int.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/enum/backed-negative-int.phpt
277 Bytes
| --TEST-- | |
| Backed enum with negative int | |
| --FILE-- | |
| enum Foo: int { | |
| case Bar = -1; | |
| case Baz = -2; | |
| } | |
| var_dump(Foo::Bar->value); | |
| var_dump(Foo::Baz->value); | |
| var_dump(Foo::from(-1)); | |
| var_dump(Foo::from(-2)); | |
| --EXPECT-- | |
| int(-1) | |
| int(-2) | |
| enum(Foo::Bar) | |
| enum(Foo::Baz) | |