hexdec manual page üzerine, şunları söyledi:
The function can now convert values
that are to big for the platforms
integer type, it will return the value
as float instead in that case.
Eğer (float değil) büyük tamsayı çeşit almak istiyorsanız, bunu bir dize içinde depolanan gerekir. Bu BC Math fonksiyonlarını kullanarak mümkün olabilir.
Eğer hexdec elle sayfanın yorumlarına bakarsanız Örneğin, göreceksiniz this note
Eğer bir uyarı önlemek için, bu işlevi biraz uyum varsa, alırsınız:
function bchexdec($hex)
{
$dec = 0;
$len = strlen($hex);
for ($i = 1; $i <= $len; $i++) {
$dec = bcadd($dec, bcmul(strval(hexdec($hex[$i - 1])), bcpow('16', strval($len - $i))));
}
return $dec;
}
(This function has been copied from the note I linked to; and only a bit adapted by me)
Ve sayısına kullanıyor:
$h = 'D5CE3E462533364B';
$f = bchexdec($h);
var_dump($f);
Çıkış olacaktır:
string '15406319846273791563' (length=20)
Yani, değil yaşadığınız büyük şamandıra tür; ve bekliyoruz ne iyi görünüyor:
Result from calc.exe =
15406319846273791563
Hope this help ;-)
And, yes, user notes on the PHP documentation are sometimes a real gold mine ;-)