private function getVarInt()
{
if (!(double) $this->value && !(int) $this->value) {
trigger_error('VarInt value ' . $this->value . ' not an int or float', E_USER_ERROR);
}
$hex = $this->bcdechex($this->value);
if (strlen($hex) % 2 != 0) {
$hex = '0' . $hex;
}
return pack('H*', $hex);
}