[php-src] Issue #15500: file_put_contents on string >= 2GB

From: Date: Mon, 19 Aug 2024 22:44:04 +0000
Subject: [php-src] Issue #15500: file_put_contents on string >= 2GB
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-247541@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/15500 Author: GajowyJ ### Description The following code: ```php <?php $size = 2*1024*1024*1024; $buf = str_repeat(' ',$size); file_put_contents('file.out',$buf); ``` Resulted in this output: ``` PHP Notice: file_put_contents(): Write of 2147483648 bytes failed with errno=0 No error in D:\test.php on line 4 PHP Warning: file_put_contents(): Only -2147483648 of 2147483648 bytes written, possibly out of free disk space in D:\test.php on line 4 ``` But I expected this output instead: ``` (no error message) ``` ### PHP Version PHP 8.1.29 (cli) ZTS ### Operating System Windows 10 (64-bit)

« previous php.bugs (#247541) next »