摘要:
原文:http://www.ebrueggeman.com/blog/integers-and-floating-numbers/ Background PHP is not a strictly typed language, and many programmers often overloo... 阅读全文
摘要:
When handling very large numbers in PHP, you'll notice they get cut off at hexadecimal 7FFFF FFFF. Sometimes, you don't need to use these numbers in an actual calculation in PHP (i.e. just editing and... 阅读全文
摘要:
A note about converting IP addresses for storage in database. For MySQL, this is unnecessary as it has built in support via the INET functions. Also, ... 阅读全文
摘要:
/*Here are some tricks to convert from a "dotted" IP address to a LONG int, and backwards. This is very useful because accessing an IP addy in a datab... 阅读全文
摘要:
/************************** * int_oct($ip) * Convert INTeger rep of IP to octal (dotted quad) */ function int_oct($ip) { /* Set var... 阅读全文
摘要:
function parse_unsigned_int($string) { $x = (float)$string; if ($x > (float)2147483647) $x -= (float)"4294967296"; ... 阅读全文