After taking another look at it with a test script, this code returns an entirely different result than the Delphi code posted above.
function base36toint($s){
$x = base_convert($s, 36, 10);
return $x;
}
function inttobase36($s) {
$x = base_convert($s, 10, 36);
return $x;
}
I test with the number : 5555444433331111
and am expecting a result of :
177XYGYLBFLZ4
but 1ip8nxua3s7 is returned:
Another developer gets cesv7b0f53
returned using the EXACT same code.
So why the differences?
tsinka:
Your code doesn't return the correct result either when trying to convert the Base36 value of 177XYGYLBFLZ4.
It returns 5.68877509973E+018.