#42126 [Opn->Fbk]: size of the file differ, when created using file_put_content() on php6
| From: | felipe@php.net | Date: | Sat, 09 Feb 2008 19:07:30 +0000 |
| Subject: | #42126 [Opn->Fbk]: size of the file differ, when created using file_put_content() on php6 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-122125@lists.php.net to get a copy of this message | ||
ID: 42126
Updated by: felipe@php.net
Reported By: kraghuba at in dot ibm dot com
-Status: Open
+Status: Feedback
Bug Type: Filesystem function related
Operating System: Windows XP
PHP Version: 6CVS-2007-07-27 (snap)
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php6.0-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php6.0-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2007-07-28 14:20:16] 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
int(44)
------------------------------------------------------------------------
[2007-07-27 12:02:06] kraghuba at in dot ibm dot com
Description:
------------
file created using file_get_contents() function differ in size on php6
with unicode switched on. The difference is 1.
Reproduce code:
---------------
<?php
$data = <<<EOT
<test>Testing fgetss() functions</test>
test
EOT;
$filename = "test.txt";
file_put_contents($filename, $data);
var_dump( filesize($filename) );
?>
Expected result:
----------------
int(44)
Actual result:
--------------
int(45)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42126&edit=1