Download src/php/php-src/Zend/tests/constants/bug45742.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 373 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/constants/bug45742.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/constants/bug45742.phpt
-
curl -L -o bug45742.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/constants/bug45742.phpt
373 Bytes
| --TEST-- | |
| Bug #45742 Wrong class array interpretation using constant indexes | |
| --FILE-- | |
| class Constants { | |
| // Needs to be equal | |
| const A = 1; | |
| const B = 1; | |
| } | |
| class ArrayProperty { | |
| public static $array = array( | |
| Constants::A => 23, | |
| Constants::B => 42, | |
| ); | |
| } | |
| var_dump( ArrayProperty::$array ); | |
| --EXPECT-- | |
| array(1) { | |
| [1]=> | |
| int(42) | |
| } | |