|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-10-19 15:26 UTC] markskilbeck@php.net
[2010-10-19 15:33 UTC] markskilbeck@php.net
[2010-10-19 15:36 UTC] cataphract@php.net
-Status: Open
+Status: Bogus
[2010-10-19 15:36 UTC] cataphract@php.net
[2010-10-19 15:37 UTC] cataphract@php.net
-Package: PHP-GTK related
+Package: *General Issues
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 06:00:01 2025 UTC |
Description: ------------ a) packing the value 928 (0x3A0) and 927 (0x39F) as unsigned long ("N") always converts to 927 (0x39F) b) masking the lower 8 bits of 0x3A0 always reads as 0x3F or 159 Note: phpinfo reports PHP Version 5.2.13 Test script: --------------- $value = 928; pack("N",$value) is 0x39f (927) $value = 927; pack("N",$value) is 0x39f (927) $value = 928; $v0 = $value & 0xff; $v0 prints as 927 Expected result: ---------------- 928 packs as 928. Actual result: -------------- 928 packs as 927 Not good for computer to lose bits.