Download src/php/php-src/Zend/tests/foreach/bug34065.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 230 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/foreach/bug34065.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/foreach/bug34065.phpt
-
curl -L -o bug34065.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/foreach/bug34065.phpt
230 Bytes
| --TEST-- | |
| Bug #34065 (throw in foreach causes memory leaks) | |
| --FILE-- | |
| $data = file(__FILE__); | |
| try { | |
| foreach ($data as $line) { | |
| throw new Exception("error"); | |
| } | |
| } catch (Exception $e) { | |
| echo "ok\n"; | |
| } | |
| --EXPECT-- | |
| ok | |