Page 1 of 1

Question using intVal(0x000783633A596945)

Posted: Mon Aug 03, 2009 12:18 pm
by stanster
I have a string literal like so 000783633A596945 that I need to convert to hex (pre-pend 0x) and then get the intVal of - the problem is that converting from the String value using intVal('0x'+'000783633A596945') is not the same as intVal(0x000783633A596945) which is what I need (without quotes).

Does anyone have any ideas as to how I should go abut doing this?

$token = '000783633A596945';
$tokenHex = '0x'. '000783633A596945';
intVal(0x000783633A596945);

Thanks
A

Re: Question using intVal(0x000783633A596945)

Posted: Mon Aug 03, 2009 12:22 pm
by Mark Baker
An intval should only fall within the maximum integer range for your server - (32 bit or 64 bit). Your string literal looks rather too long even for a 64-bit machine