private function getBufferLength($thrift): int
    {
        $memoryBuffer = new TMemoryBuffer();

        $thrift->write(new TCompactProtocol($memoryBuffer));

        return $memoryBuffer->available();
    }
private function getBufferLength($thrift): int
    {
        $memoryBuffer = new TMemoryBuffer();

        $thrift->write(new TCompactProtocol($memoryBuffer));

        return $memoryBuffer->available();
    }
private function getBufferLength ( $ thrift ) : int { $ memoryBuffer = new TMemoryBuffer ( ) ; $ thrift -> write ( new TCompactProtocol ( $ memoryBuffer ) ) ; return $ memoryBuffer -> available ( ) ; }
Returns the length of a thrift-object.

@param ThriftSpan|TBase $thrift

@return int
Returns the length of a thrift - object .