in src/Apache/Ignite/Internal/Binary/MessageBuffer.php [115:130]
public function writeNumber($value, int $type, bool $signed = true): void
{
$size = TypeInfo::getTypeInfo($type)->getSize();
if ($type === ObjectType::LONG && BinaryUtils::$is32BitInt) {
// pack longs doesn't work on 32-bit versions of PHP
$strValue = strrev(hex2bin(BinaryUtils::getLongHex(BigInteger::of(abs($value)), $value < 0)));
} else {
$format = $this->getNumberFormat($type, $signed);
$strValue = pack($format, $value);
$this->convertEndianness($strValue, $type);
}
if (strlen($strValue) !== $size) {
BinaryUtils::unsupportedType(BinaryUtils::getTypeName($type));
}
$this->writeStr($strValue);
}