#42126 [NEW]: size of the file differ, when created using file_put_content() on php6
| From: | kraghuba at in dot ibm dot com | Date: | Fri, 27 Jul 2007 12:02:06 +0000 |
| Subject: | #42126 [NEW]: size of the file differ, when created using file_put_content() on php6 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-115502@lists.php.net to get a copy of this message | ||
From: kraghuba at in dot ibm dot com
Operating system: Windows XP
PHP version: 6CVS-2007-07-27 (snap)
PHP Bug Type: Filesystem function related
Bug description: size of the file differ, when created using file_put_content() on php6
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 bug report at http://bugs.php.net/?id=42126&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42126&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42126&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42126&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42126&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=42126&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=42126&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=42126&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=42126&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=42126&r=support
Expected behavior: http://bugs.php.net/fix.php?id=42126&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=42126&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=42126&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42126&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42126&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42126&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=42126&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=42126&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=42126&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=42126&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=42126&r=mysqlcfg