Download src/php/php-src/Zend/tests/ArrayAccess/bug33710.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 556 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/ArrayAccess/bug33710.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/ArrayAccess/bug33710.phpt
-
curl -L -o bug33710.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/ArrayAccess/bug33710.phpt
556 Bytes
| --TEST-- | |
| Bug #33710 (ArrayAccess objects doesn't initialize $this) | |
| --FILE-- | |
| class Foo implements ArrayAccess | |
| { | |
| function offsetExists($offset): bool { return true;} | |
| function offsetGet($offset): mixed { return null; } | |
| function offsetSet($offset, $value): void {/*...*/} | |
| function offsetUnset($offset): void {/*...*/} | |
| function fail() | |
| { | |
| $this['blah']; | |
| } | |
| function succeed() | |
| { | |
| $this; | |
| $this['blah']; | |
| } | |
| } | |
| $bar = new Foo(); | |
| $bar->succeed(); | |
| $bar->fail(); | |
| ===DONE=== | |
| --EXPECT-- | |
| ===DONE=== | |