|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-09-17 05:50 UTC] dev at generalprotectionfault dot de
I've tried this:
list($x) = sscanf( 'ac100000', '%x' );
printf("%x",$x);
And I got "7fffffff", weird.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 17:00:01 2025 UTC |
Please use the Web system for answerring. User update: You said php4 uses signed integers, so please explain that: // - - - - - - - - - - - - - - - - - - list($x) = sscanf( 'ffffffff', '%x' ); printf("%x<br>",$x); $x = pow(2,32)-1; echo $x , "<br>"; $y = ( $x >> 16 ) & 0xFFFF ; $x &= 0xFFFF; printf("%x%x<br>",$y,$x); // - - - - - - - - - - - - - - - - - - Result: 7fffffff 4294967295 ffffffff