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
Question using intVal(0x000783633A596945)
Moderator: General Moderators
-
Mark Baker
- Forum Regular
- Posts: 710
- Joined: Thu Oct 30, 2008 6:24 pm
Re: Question using intVal(0x000783633A596945)
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