Download src/php/php-src/Zend/tests/concat/bug44069.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 449 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/concat/bug44069.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/concat/bug44069.phpt
-
curl -L -o bug44069.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/concat/bug44069.phpt
449 Bytes
| --TEST-- | |
| Bug #44069 (Huge memory usage with concatenation using . instead of .=) | |
| --FILE-- | |
| $array = array(); | |
| $newstring = ""; | |
| $string = str_repeat('This is a teststring.', 50); | |
| for($i = 1; $i <= 2000; $i++) | |
| { | |
| // $newstring .= $string; //This uses an expected amount of mem. | |
| $newstring = $newstring . $string; //This uses very much mem. | |
| for($j = 1; $j <= 10; $j++) | |
| { | |
| $array[] = 'test'; | |
| } | |
| } | |
| echo "ok\n"; | |
| --EXPECT-- | |
| ok | |