Tonic-_- Posted August 8, 2009 Share Posted August 8, 2009 Well anyways this has been on my mind for awhile not many good php examples for hex period but I want to add hex strings together... like $a = dechex(0x0055a048); $b = dechex(0x08800000); $hex = $a+$b; That should e echo $hex; That is supposed to echo 08d5a048 but of course doesn't. Figured you guys would know.. Quote Link to comment Share on other sites More sharing options...
Mark Baker Posted August 8, 2009 Share Posted August 8, 2009 $a = 0x0055a048; $b = 0x08800000; echo dechex($a).' + '.dechex($b).' = '; $hex = $a+$b; echo dechex($hex); or $a = '0055a048'; $b = '08800000'; echo $a.' + '.$b.' = '; $hex = hexdec($a)+hexdec($b); echo dechex($hex); Quote Link to comment Share on other sites More sharing options...
Tonic-_- Posted August 8, 2009 Author Share Posted August 8, 2009 First once worked, thanks. Been wondering about that for a while. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.