Skip to content

Bug #76844 PHP crashes on big file with array inside #11240

Closed
@MikeRich88

Description

@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 (after you fix the install). This bug was never fixed.

PHP Version

8.2.5

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions