PHP long integers for thrift PHP long integers for thrift php php

PHP long integers for thrift


You are right,

The size of an integer is platform-dependent, although a maximum value of about two billion is the usual value (that's 32 bits signed). 64-bit platforms usually have a maximum value of about 9E18. PHP does not support unsigned integers. Integer size can be determined using the constant PHP_INT_SIZE, and maximum value using the constant PHP_INT_MAX since PHP 4.4.0 and PHP 5.0.5.

http://www.php.net/manual/en/language.types.integer.php

If you use microtime() you need not to divide it by 1000. Its float, you may want to multiply it by 1000.

You may use BC Math for calclulate it as numbers, using string types. I guess string are OK to communicate with any other thing.

In case of multiplying by 1000, you even not need BCMath. Just delete comma from string representation of microtime(true) (or space from microtime)