#36148 [Opn]: unpack("H*hex", $data) is adding an extra character to the end of the string.
| From: | andy at advancethermal dot com | Date: | Tue, 24 Jan 2006 23:10:46 +0000 |
| Subject: | #36148 [Opn]: unpack("H*hex", $data) is adding an extra character to the end of the string. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-92436@lists.php.net to get a copy of this message | ||
ID: 36148
User updated by: andy at advancethermal dot com
Reported By: andy at advancethermal dot com
Status: Open
Bug Type: Unknown/Other Function
Operating System: WinXP, Win2k3
PHP Version: 5.1.2
New Comment:
Sorry, reverse the Expected and Actual Results...
Previous Comments:
------------------------------------------------------------------------
[2006-01-25 00:09:59] andy at advancethermal dot com
Description:
------------
unpack("H*hex", $data) is adding an unexpected extra character to the
end of the string. Upgraded to PHP 5.1.2 using Windows Zip package.
Reproduce code:
---------------
echo "<p>".unpack("H*hex", file_get_contents("c:/php/php.exe"));
Try in 5.0.5 and 5.1.2 -- there is a difference.
Expected result:
----------------
...fff90
Actual result:
--------------
...fff9
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36148&edit=1