|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42126 size of the file differ, when created using file_put_content() on php6
Submitted: 2007-07-27 12:02 UTC Modified: 2008-02-17 01:00 UTC
From: kraghuba at in dot ibm dot com Assigned:
Status: No Feedback Package: Filesystem function related
PHP Version: 6CVS-2007-07-27 (snap) OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: kraghuba at in dot ibm dot com
New email:
PHP Version: OS:


 [2007-07-27 12:02 UTC] kraghuba at in dot ibm dot com
file created using file_get_contents() function differ in size on php6 with unicode switched on. The difference is 1.

Reproduce code:
$data = <<<EOT
<test>Testing fgetss() functions</test>

$filename = "test.txt";
file_put_contents($filename, $data);
var_dump( filesize($filename) );

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-28 14:20 UTC] judas dot iscariote at gmail dot com
I just compiled a fresh CVS snap and works for me.. 

/sapi/cli/php -dunicode.semantics=1 put.php

 [2008-02-09 19:07 UTC]
Please try using this CVS snapshot:
For Windows:

 [2008-02-17 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Mar 03 08:01:25 2021 UTC