[php-src] Issue #11240: Bug #76844 PHP crashes on big file with array inside
| From: | MikeRich88 | Date: | Sun, 14 May 2023 16:30:05 +0000 |
| Subject: | [php-src] Issue #11240: Bug #76844 PHP crashes on big file with array inside | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-244447@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/11240
Author: MikeRich88
### Description
https://bugs.php.net/bug.php?id=76844
I typed up a really nice thing and then the browser crashed so I'm not doing that again 😭
```
<?php
$factor = 10000;
$num = 62;
$file = '';
for($i=0;$i<100000;$i++) {
$file .= "\$wall_bans[$num]['".md5($i)."'] = true;\n";
if($i % $factor == 0) {
$num++;
}
}
file_put_contents('bigarray.php', "<?php\n\$wall_bans =
[];".$file."\n?>");
echo "OK, now run: php -d opcache.enable_cli=1 bigarray.php\n";
?>
```
Run code, then run the code it makes.
it does it on PHP 8.2.5 on CentOS 7 and PHP 8.2.6 on Mac Venture whatever. This bug was never fixed.
### PHP Version
8.2.5
### Operating System
_No response_