Bug #18143: writing binary number as raw binary

From: Date: Wed, 03 Jul 2002 16:57:29 +0000
Subject: Bug #18143: writing binary number as raw binary
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-13009@lists.php.net to get a copy of this message
From: ericksbr@infocon-inc.com Operating system: Windows NT 4.0 SP 5 (Intel) PHP version: 4.1.2 PHP Bug Type: Filesystem function related Bug description: writing binary number as raw binary Basically, what I want to do is write the hexadecimal value "0x0F000000L" out to a file, without it being converted to a string. I am using a C program to read the file and the results don't match. // #define COUNT_FLAG 0x0F000000L define("COUNT_FLAG", "251658240", FALSE); // define("COUNT_FLAG", "0x0F000000", FALSE); // Open file $fp = fopen($sTempFileName, "ab"); fwrite($fp, COUNT_FLAG); // Copy Count fwrite($fp, $nCopyCount); fwrite($fp, intval(COUNT_FLAG) ); fwrite($fp, serialize(intval($nCopyCount)) ); fclose($fp); -- Edit bug report at http://bugs.php.net/?id=18143&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=18143&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=18143&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=18143&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=18143&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=18143&r=support Expected behavior: http://bugs.php.net/fix.php?id=18143&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=18143&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=18143&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=18143&r=globals

« previous php.bugs (#13009) next »