[php-src] Issue #19542: require() with >2GB

From: Date: Thu, 21 Aug 2025 12:37:43 +0000
Subject: [php-src] Issue #19542: require() with >2GB
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-250593@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/19542 Author: thbley ### Description The following code: ```php <?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 ```plain 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

« previous php.bugs (#250593) next »