-
Notifications
You must be signed in to change notification settings - Fork 8k
Open
Labels
Description
Description
The following code:
<?php
ini_set('display_errors', 1);
ini_set('memory_limit', '10G');
$fp = fopen('/tmp/test.php', 'w');
fwrite($fp, '<?php return "');
for ($i=0; $i < 2048; $i++) {
fwrite($fp, str_repeat('#', 1024*1024));
}
fwrite($fp, '";');
fclose($fp);
$a = require '/tmp/test.php';
echo strlen($a);
Resulted in this output:
0
But I expected this output instead:
2147483664 (or similar)
PHP Version
PHP 8.4.11 (cli) (built: Aug 3 2025 08:42:03) (NTS)
Copyright (c) The PHP Group
Built by Debian
Zend Engine v4.4.11, Copyright (c) Zend Technologies
with Zend OPcache v8.4.11, Copyright (c), by Zend Technologies
Operating System
Ubuntu 22.04.5 LTS