Download src/php/php-src/Zend/tests/generators/bug74840.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 318 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/generators/bug74840.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/generators/bug74840.phpt
-
curl -L -o bug74840.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/generators/bug74840.phpt
318 Bytes
| --TEST-- | |
| Bug #74840: Opcache overwrites argument of GENERATOR_RETURN within finally | |
| --FILE-- | |
| $g = (function($a) { | |
| try { | |
| return $a + 1; | |
| } finally { | |
| $b = $a + 2; | |
| var_dump($b); | |
| } | |
| yield; // Generator | |
| })(1); | |
| $g->next(); | |
| var_dump($g->getReturn()); | |
| --EXPECT-- | |
| int(3) | |
| int(2) | |