#42126 [Com]: size of the file differ, when created using file_put_content() on php6

From: Date: Sat, 28 Jul 2007 14:20:19 +0000
Subject: #42126 [Com]: 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-115520@lists.php.net to get a copy of this message
ID: 42126 Comment by: judas dot iscariote at gmail dot com Reported By: kraghuba at in dot ibm dot com Status: Open Bug Type: Filesystem function related Operating System: Windows XP PHP Version: 6CVS-2007-07-27 (snap) New Comment: I just compiled a fresh CVS snap and works for me.. /sapi/cli/php -dunicode.semantics=1 put.php int(44) Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#115520) next »