Download src/php/php-src/ext/opcache/tests/opt/gh10008.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 544 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/opcache/tests/opt/gh10008.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/opcache/tests/opt/gh10008.phpt
-
curl -L -o gh10008.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/opcache/tests/opt/gh10008.phpt
544 Bytes
| --TEST-- | |
| GH-10008: Narrowing occurred during type inference of ZEND_ADD_ARRAY_ELEMENT | |
| --INI-- | |
| opcache.enable=1 | |
| opcache.enable_cli=1 | |
| --EXTENSIONS-- | |
| opcache | |
| --FILE-- | |
| function test() | |
| { | |
| $bool_or_int = true; | |
| while (a()) { | |
| if ($bool_or_int !== true) { | |
| // The following line triggers narrowing during type inference of ZEND_ADD_ARRAY_ELEMENT. | |
| $string_key = "a"; | |
| $array = ["bool_or_int" => $bool_or_int, $string_key => 123]; | |
| } | |
| $bool_or_int = 0; | |
| } | |
| } | |
| DONE | |
| --EXPECT-- | |
| DONE | |