stog #8987(2009/05/22 13:00 GMT) [ PHP ] Rating0/0=0.00
PHP 5.1.6 hexdec()ではinteger型の範囲をこえる数値は、float型で返すみたいなので、 gmp_strval()を使いました。
see: PHP Manual - hexdec
1 2 3 4 5 6 7 8 9 10 11
// hexdec() ※うまくいかない $ php -r 'echo hexdec($argv[1]),"\n";' 0x12437308CCB6 20080902065334 $ php -r 'echo hexdec($argv[1]),"\n";' 0x2C9C1227FC6520B 2.0090401231145E+17 // gmp_strval() $ php -r 'echo gmp_strval($argv[1]),"\n";' 0x12437308CCB6 20080902065334 $ php -r 'echo gmp_strval($argv[1]),"\n";' 0x2C9C1227FC6520B 200904012311450123
Rating0/0=0.00-0+
1 reply [ reply ]
stog
#8987()
[
PHP
]
Rating0/0=0.00
see: PHP Manual - hexdec
Rating0/0=0.00-0+
1 reply [ reply ]