src/SimpleJWT/Util/Util.php
/**
     * Converts an interger into a 64-bit big-endian byte string.
     *
     * @param int $x the interger
     * @return string the byte string
     */
Converts an interger into a 64-bit big-endian byte string.
@param int $x the interger
@return string the byte string
Converts an interger into a 64 - bit big - endian byte string . @param int $x the interger @return string the byte string
static function packInt64($x) {
        if (PHP_INT_SIZE == 8) {
            if (version_compare(PHP_VERSION, '5.6.3', '>=')) {
                return pack('J', $x);
            } else {
                return pack('NN', ($x & 0xFFFFFFFF00000000) >> 32, $x & ($x & 0x00000000FFFFFFFF)); 
            }
        } else {
            return "\x00\x00\x00\x00" . pack('N', $x);
        }
    }
static function packInt64 ( $ x ) { if ( PHP_INT_SIZE == 8 ) { if ( version_compare ( PHP_VERSION , '5.6.3' , '>=' ) ) { return pack ( 'J' , $ x ) ; } else { return pack ( 'NN' , ( $ x & 0xFFFFFFFF00000000 ) >> 32 , $ x & ( $ x & 0x00000000FFFFFFFF ) ) ; } } else { return " \x00 \x00 \x00 \x00 " . pack ( 'N' , $ x ) ; } }
Converts an interger into a 64-bit big-endian byte string.
Converts an interger into a 64 - bit big - endian byte string .
// 32-bit system