Hi! When I convert the below hex string into a decimal number with the hexdec function, it gives me a result of 3892131585. This is technically correct in that it's the unsigned result. However, I need PHP to return the signed result from this function which is -402835711.
The PHP reference for the hexdec and dechex functions says "The largest number that can be converted is 7fffffff or 2147483647 in decimal." Am I assuming incorrectly that this means PHP should return a signed result? Either way, how can I get it to not return an unsigned value??
hexdec("E7FD3701") = 3892131585
Thanks! -- Mike
The PHP reference for the hexdec and dechex functions says "The largest number that can be converted is 7fffffff or 2147483647 in decimal." Am I assuming incorrectly that this means PHP should return a signed result? Either way, how can I get it to not return an unsigned value??
hexdec("E7FD3701") = 3892131585
Thanks! -- Mike