/** * Write an integer as an unsigned 64-bit value. */ public function write_longlong($n) { // if PHP_INT_MAX is big enough for that // (always on 64 bits, with smaller values in 32 bits) if ($n <= PHP_INT_MAX) { // trick explained in http://www.php.net/manual/fr/function.pack.php#109328 $n1 = ($n & 1.8446744069414584E+19) >> 32; $n2 = $n & 0xffffffff; $this->out .= pack('NN', $n1, $n2); } else { $this->out .= implode("", AMQPWriter::chrbytesplit($n, 8)); } return $this; }
/** * Write an integer as an unsigned 64-bit value. */ public function write_longlong($n) { $this->flushbits(); $this->out .= implode("", AMQPWriter::chrbytesplit($n, 8)); return $this; }