Download src/php/php-src/ext/reflection/tests/ReflectionClassConstant_isEnumCase.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 426 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/reflection/tests/ReflectionClassConstant_isEnumCase.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/reflection/tests/ReflectionClassConstant_isEnumCase.phpt
-
curl -L -o ReflectionClassConstant_isEnumCase.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/reflection/tests/ReflectionClassConstant_isEnumCase.phpt
426 Bytes
| --TEST-- | |
| ReflectionClassConstant::isEnumCase() | |
| --FILE-- | |
| <?php | |
| enum Foo { | |
| case Bar; | |
| const Baz = self::Bar; | |
| } | |
| class Qux { | |
| const Quux = 0; | |
| } | |
| var_dump((new ReflectionClassConstant(Foo::class, 'Bar'))->isEnumCase()); | |
| var_dump((new ReflectionClassConstant(Foo::class, 'Baz'))->isEnumCase()); | |
| var_dump((new ReflectionClassConstant(Qux::class, 'Quux'))->isEnumCase()); | |
| ?> | |
| --EXPECT-- | |
| bool(true) | |
| bool(false) | |
| bool(false) | |