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.. Link to comment https://forums.phpfreaks.com/topic/169404-solved-addin-in-hexacecimal/ 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); Link to comment https://forums.phpfreaks.com/topic/169404-solved-addin-in-hexacecimal/#findComment-893814 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. Link to comment https://forums.phpfreaks.com/topic/169404-solved-addin-in-hexacecimal/#findComment-893818 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.