Download src/php/php-src/Zend/tests/ArrayAccess/bug78356.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 471 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/ArrayAccess/bug78356.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/ArrayAccess/bug78356.phpt
-
curl -L -o bug78356.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/ArrayAccess/bug78356.phpt
471 Bytes
| --TEST-- | |
| Bug #78356: Array returned from ArrayAccess is incorrectly unpacked as argument | |
| --FILE-- | |
| $object = new class implements ArrayAccess { | |
| public function offsetGet($offset): mixed | |
| { | |
| return [1, 2]; | |
| } | |
| public function offsetExists($offset): bool | |
| { | |
| return true; | |
| } | |
| public function offsetUnset($offset): void {} | |
| public function offsetSet($offset, $value): void {} | |
| }; | |
| var_dump(max(...$object[0])); | |
| --EXPECT-- | |
| int(2) | |